only use become when we are not root
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- name: "Set become to true"
|
||||
set_fact:
|
||||
ansible_become: true
|
||||
when: "ansible_user_id != 'root'"
|
||||
|
||||
- name: "Include OS specific tasks"
|
||||
ansible.builtin.include_tasks: "compliance_{{ ansible_distribution }}.yaml"
|
||||
Reference in New Issue
Block a user