ansible-personal/roles/common/tasks/provisioning.yml
Alan Orth 3b6c9745ab
roles/common: Add provisioning user to sudoers
Signed-off-by: Alan Orth <alan.orth@gmail.com>
2015-01-05 08:24:13 +03:00

11 lines
598 B
YAML

---
# 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' }
# vim: set ts=2 sw=2: