rework a bug with become_user and unarchive

This commit is contained in:
Robert Kaussow 2018-07-08 22:48:29 +02:00
parent f9815eeaee
commit b5aa38be55

View File

@ -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 }}"