- name: Allow passwordless operations for phd
become: true
copy:
- content: 'phd ALL=(ALL:ALL) NOPASSWD: ALL'
+ content: |
+ Defaults !admin_flag
+ phd ALL=(ALL:ALL) NOPASSWD: ALL
dest: /etc/sudoers.d/phd
owner: root
group: "{% if ansible_facts.os_family == 'Debian' %}sudo{% elif ansible_facts.os_family == 'RedHat' %}root{% endif %}"