roles/common: Add provisioning user to sudoers
Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
parent
36a3bbf36d
commit
3b6c9745ab
1
roles/common/files/etc/sudoers.d/provisioning
Normal file
1
roles/common/files/etc/sudoers.d/provisioning
Normal file
@ -0,0 +1 @@
|
|||||||
|
provisioning ALL=(ALL) ALL
|
@ -1,4 +1,8 @@
|
|||||||
---
|
---
|
||||||
|
# needs to be first, otherwise it errors after we change the password used for sudo (below)
|
||||||
|
- name: Add provisioning user to sudoers
|
||||||
|
copy: src=etc/sudoers.d/provisioning dest=/etc/sudoers.d/provisioning owner=root group=root mode=600 validate='visudo -cf %s'
|
||||||
|
|
||||||
# create user or update settings if the user already exists
|
# create user or update settings if the user already exists
|
||||||
- name: Set password, shell, etc for provisioning user
|
- name: Set password, shell, etc for provisioning user
|
||||||
user: { name: '{{ provisioning_user.name }}', password: '{{ provisioning_user.password }}', shell: '{{ provisioning_user.shell }}', state: '{{ provisioning_user.state }}', createhome: 'yes' }
|
user: { name: '{{ provisioning_user.name }}', password: '{{ provisioning_user.password }}', shell: '{{ provisioning_user.shell }}', state: '{{ provisioning_user.state }}', createhome: 'yes' }
|
||||||
|
Loading…
Reference in New Issue
Block a user