593 B
593 B
9 - Vault
This exercise makes you create and use an Ansible Vault.
Vault and Playbook Creation
Create a vault with a var named password
and the value of your choice.
Create a playbook following the given specs:
- Run on host group
lab
- Create a
htpasswd
file in/tmp
(using the corresponding module) containing one userwebuser
and the password stored in the vault.
Validation
Run the playbook and ensure the htpasswd
is created.
There is a working playbook in solution/solution.yml
. It uses a vault stored in solution/vars/vault.yml
with the password ansible
.