roles/common: Add provisioning user to sudoers

Signed-off-by: Alan Orth <alan.orth@gmail.com>
This commit is contained in:
Alan Orth 2015-01-05 08:24:13 +03:00
parent 36a3bbf36d
commit 3b6c9745ab
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1 @@
provisioning ALL=(ALL) ALL

View File

@ -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
- 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' }