From c75bde2257abd026d0d1838cbf66f7cc035cc730 Mon Sep 17 00:00:00 2001 From: distrobyte Date: Sat, 11 Feb 2023 01:56:48 +0000 Subject: [PATCH] add become to required tasks --- ansible/roles/ssh/tasks/creategroups.yml | 1 + ansible/roles/ssh/tasks/main.yml | 1 + 2 files changed, 2 insertions(+) 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