refactor(ansible): use ansible_user_id and add root package condition
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
@@ -14,11 +14,11 @@
|
||||
- "{{ docker.directories.compose }}"
|
||||
become: true
|
||||
|
||||
- name: Set ownership to {{ user }}
|
||||
- name: Set ownership to {{ ansible_user_id }}
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
owner: "{{ user }}"
|
||||
group: "{{ user }}"
|
||||
owner: "{{ ansible_user_id }}"
|
||||
group: "{{ ansible_user_id }}"
|
||||
loop:
|
||||
- "{{ docker.directories.local }}"
|
||||
- "{{ docker.directories.config }}"
|
||||
|
||||
Reference in New Issue
Block a user