- name: copy nifi install file
  become: true
  become_user: root
  copy:
    src: files/nifi-1.3.0-bin.tar.gz
    dest: "/opt/"
    owner: "{{ deployer }}"
    mode: 0777

- name: unpack nifi
  become: true
  become_user: root
  unarchive:
    remote_src: yes
    src: /opt/nifi-1.3.0-bin.tar.gz
    dest: /opt/

- name: install nifi as a service
  become: true
  become_user: root
  shell: /opt/nifi-1.3.0/bin/nifi.sh install

# starting as a service doesn't work when systemctl is used instead of init.d so starting manually
# somehow ansible start command doesn't work so do this manually form the master node
- name: start nifi
  become: true
  become_user: root
  shell: /opt/nifi-1.3.0/bin/nifi.sh start

# - name: copy nifi install file
#   become: true
#   become_user: root
#   copy:
#     src: files/nifi-1.3.0-bin.tar.gz
#     dest: "/opt/"
#     owner: "{{ deployer }}"
#     mode: 0777

- name: download nifi install file
  become: true
  become_user: root
  get_url:
    url: http://apache.cs.uu.nl/nifi/1.3.0/nifi-1.3.0-bin.tar.gz
    dest: /opt/nifi-1.3.0-bin.tar.gz
    mode: 0444

- name: unpack nifi
  become: true
  become_user: root
  unarchive:
    remote_src: yes
    src: /opt/nifi-1.3.0-bin.tar.gz
    dest: /opt/

- name: install nifi as a service
  become: true
  become_user: root
  shell: /opt/nifi-1.3.0/bin/nifi.sh install

# starting as a service doesn't work when systemctl is used instead of init.d so starting manually
# somehow ansible start command doesn't work so do this manually form the master node
- name: start nifi
  become: true
  become_user: root
  shell: /opt/nifi-1.3.0/bin/nifi.sh start

Use remote download of large file
Use remote download of large file
