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:
@@ -5,9 +5,9 @@
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: Append the group docker to "{{ user }}"
|
||||
- name: Append the group docker to "{{ ansible_user_id }}"
|
||||
ansible.builtin.user:
|
||||
name: "{{ user }}"
|
||||
name: "{{ ansible_user_id }}"
|
||||
shell: /bin/bash
|
||||
groups: docker
|
||||
append: true
|
||||
|
||||
Reference in New Issue
Block a user