diff --git a/ansible/roles/ssh/tasks/creategroups.yml b/ansible/roles/ssh/tasks/creategroups.yml index 3c27665..325e0f4 100644 --- a/ansible/roles/ssh/tasks/creategroups.yml +++ b/ansible/roles/ssh/tasks/creategroups.yml @@ -1,5 +1,6 @@ --- - name: Ensure user groups are present + become: true group: name: "{{ item }}" state: present diff --git a/ansible/roles/ssh/tasks/main.yml b/ansible/roles/ssh/tasks/main.yml index 1fb76ce..479032a 100644 --- a/ansible/roles/ssh/tasks/main.yml +++ b/ansible/roles/ssh/tasks/main.yml @@ -5,6 +5,7 @@ loop_var: user_data - name: Ensure user accounts are present + become: true user: name: "{{ item.user | default(item) }}" shell: /bin/bash