diff --git a/playbooks/bootstrap-ansible/site.yaml b/playbooks/bootstrap-ansible/site.yaml index 9247e27..87265af 100644 --- a/playbooks/bootstrap-ansible/site.yaml +++ b/playbooks/bootstrap-ansible/site.yaml @@ -31,12 +31,6 @@ - hosts: all tasks: - - name: Disable password for sudo users - become: true - copy: - content: "%sudo ALL=(ALL) NOPASSWD: ALL" - dest: /etc/sudoers.d/sudo - - name: reboot become: true reboot: diff --git a/playbooks/bootstrap/roles/users/tasks/main.yaml b/playbooks/bootstrap/roles/users/tasks/main.yaml index 7ae42ae..b918c14 100644 --- a/playbooks/bootstrap/roles/users/tasks/main.yaml +++ b/playbooks/bootstrap/roles/users/tasks/main.yaml @@ -38,3 +38,9 @@ state: present user: "{{ item.name }}" with_items: "{{ windmill_users }}" + +- name: Disable password for sudo users + become: true + copy: + content: "%sudo ALL=(ALL) NOPASSWD: ALL" + dest: /etc/sudoers.d/sudo