Skip to content

Instantly share code, notes, and snippets.

@bcoca
Created November 25, 2014 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcoca/66a4eabf4bcb7ffff353 to your computer and use it in GitHub Desktop.
Save bcoca/66a4eabf4bcb7ffff353 to your computer and use it in GitHub Desktop.
---
- hosts: localhost
gather_facts: no
vars_files:
- vars/vaulted_vars.yml
tasks:
- debug: var=secret
...
```
ansible-playbook play.yml --ask-vault-pass -i 'localhost,'
Vault password:
__________________
< PLAY [localhost] >
------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
________________________
< TASK: debug var=secret >
------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
ok: [localhost] => {
"secret": "shush!"
}
____________
< PLAY RECAP >
------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
localhost : ok=1 changed=0 unreachable=0 failed=0
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment