Passwords (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.
1 shell> cat host_vars/build.example.com/fp-passwords.yml
2 ---
3 fp_passwords: true
4 fp_passwordstore: true
5 fp_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