From f9815eeaeeb191dbf77ff4771f3149b0a04a945b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 8 Jul 2018 22:36:54 +0200 Subject: [PATCH] fix permissions --- tasks/install.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tasks/install.yml b/tasks/install.yml index d2a35be..39eeffe 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -25,19 +25,23 @@ state: directory owner: "{{ unifi_user }}" group: "{{ unifi_group }}" + recurse: True with_items: - "{{ unifi_base_dir }}" - "{{ unifi_base_dir }}/{{ unifi_version }}" become: True -- name: Setup unifi version '{{ unifi_version }}' - unarchive: - src: "https://dl.ubnt.com/unifi/{{ unifi_version }}/UniFi.unix.zip" - dest: "{{ unifi_base_dir }}/{{ unifi_version }}" - remote_src: yes +- block: + - name: Setup unifi version '{{ unifi_version }}' + unarchive: + src: "https://dl.ubnt.com/unifi/{{ unifi_version }}/UniFi.unix.zip" + dest: "{{ unifi_base_dir }}/{{ unifi_version }}" + remote_src: yes -- name: Create symlink for latest version - file: - src: "{{ unifi_base_dir }}/{{ unifi_version }}" - dest: "{{ unifi_base_dir }}/latest" - state: link + - name: Create symlink for latest version + file: + src: "{{ unifi_base_dir }}/{{ unifi_version }}" + dest: "{{ unifi_base_dir }}/latest" + state: link + become: True + become_user: "{{ unifi_user }}"