fix user permission while upgrade
This commit is contained in:
parent
aaa42cc7c8
commit
f4851a416b
@ -39,17 +39,23 @@
|
||||
file:
|
||||
path: "{{ unifi_base_dir }}/{{ unifi_version }}//UniFi/data"
|
||||
state: absent
|
||||
become: True
|
||||
become_user: "{{ unifi_user }}"
|
||||
|
||||
- name: Stop service while restore process
|
||||
systemd:
|
||||
state: stopped
|
||||
enabled: yes
|
||||
name: unifi
|
||||
become: True
|
||||
become_user: root
|
||||
|
||||
- name: Copy data folder from previews version
|
||||
synchronize:
|
||||
src: "{{ unifi_base_dir }}/{{ unifi_current_version }}/UniFi/data"
|
||||
dest: "{{ unifi_base_dir }}/{{ unifi_version }}/UniFi"
|
||||
become: True
|
||||
become_user: "{{ unifi_user }}"
|
||||
delegate_to: "{{ inventory_hostname }}"
|
||||
|
||||
- name: Start service after restore process
|
||||
@ -58,7 +64,7 @@
|
||||
enabled: yes
|
||||
name: unifi
|
||||
become: True
|
||||
become_user: "{{ unifi_user }}"
|
||||
become_user: root
|
||||
when:
|
||||
- unifi_version is version(unifi_current_version, ">")
|
||||
- unifi_restore_after_upgrade
|
||||
|
Loading…
Reference in New Issue
Block a user