diff --git a/tasks/install.yml b/tasks/install.yml index 39eeffe..dc3e945 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -32,9 +32,15 @@ become: True - block: + - name: Download unifi version '{{ unifi_version }}' + get_url: + url: "https://dl.ubnt.com/unifi/{{ unifi_version }}/UniFi.unix.zip" + dest: /tmp/UniFi.unix.zip + force: true + - name: Setup unifi version '{{ unifi_version }}' unarchive: - src: "https://dl.ubnt.com/unifi/{{ unifi_version }}/UniFi.unix.zip" + src: /tmp/UniFi.unix.zip dest: "{{ unifi_base_dir }}/{{ unifi_version }}" remote_src: yes @@ -43,5 +49,10 @@ src: "{{ unifi_base_dir }}/{{ unifi_version }}" dest: "{{ unifi_base_dir }}/latest" state: link + + - name: Cleanup + file: + path: /tmp/UniFi.unix.zip + state: absent become: True become_user: "{{ unifi_user }}"