2020-10-17 01:00:06 -05:00
|
|
|
#!/usr/bin/env ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
2020-11-08 00:05:48 -06:00
|
|
|
- name: create ansible user
|
2022-06-16 23:45:29 -05:00
|
|
|
ansible.builtin.user: name=ansible password_lock=yes
|
2020-11-08 00:05:48 -06:00
|
|
|
- name: configure ansible user home directory
|
2022-06-16 23:45:29 -05:00
|
|
|
ansible.builtin.file: path=/home/ansible owner=ansible group=ansible
|
2020-11-08 00:05:48 -06:00
|
|
|
- name: configure ansible user keys
|
|
|
|
authorized_key: user=ansible manage_dir=yes key={{ common_ansible_pubkey }}
|
|
|
|
- name: configure ansible user sudo
|
2022-06-16 23:45:29 -05:00
|
|
|
ansible.builtin.lineinfile: path=/etc/sudoers line="ansible ALL=(ALL:ALL) NOPASSWD:ALL"
|