ansible-labs/100.Vault/100.Vault.md

594 B

10 - 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 user webuser 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.