passwords
Manage users’ passwords. At the moment only passwordstore
Unix
password manager is implemented.
passwordstore
Create passwords in passwordstore
and enable access for the user
who is running the playbook. For example,
shell> pass build.example.com/
build.example.com
├── admin
└── root
Configure the variables:
Enable the management of the users’ passwords (3)
Select
passwordstore
(4)Configure the variable that keeps the name of the host used in passwordstore (5). In this case ansible_nodename. Next options might be inventory_hostname (default), ansible_hostname, or any other custom variable.
1shell> cat host_vars/build.example.com/fp-passwords.yml
2---
3fp_passwords: true
4fp_passwordstore: true
5fp_passwordstore_hostname_var: ansible_nodename
6...
Dry-run the tasks, display the variables, and display the changes
shell> ansible-playbook playbook.yml -t fp_passwords -e fp_passwords_debug=true -CD
If all seems to be right manage the users’ passwords
shell> ansible-playbook playbook.yml -t fp_passwords
See also
Annotated Source code passwords.yml
Project website passwordstore.org