>> vars.protected_values.yml == vars/protected_values.yml
$ ansible-playbook my-playbook.yml --ask-vault-pass
$ ansible-playbook my-playbook0.yml --ask-vault-pass
Passw0rd
Last active
January 31, 2019 15:58
-
-
Save jovenbico/65f5fd1a381663b38009155a21c33b9d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
tasks: | |
# include_vars can only use under tasks | |
- name: Include protected values | |
include_vars: | |
file: protected_values.yml | |
- name: Use the protected_values | |
debug: | |
msg: "user: {{vault_username}} || pass {{vault_password}}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
vars_files: | |
- vars/protected_values.yml | |
tasks: | |
- name: Use the protected_values | |
debug: | |
msg: "user: {{vault_username}} || pass {{vault_password}}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ANSIBLE_VAULT;1.1;AES256 | |
38343936306465653530383231366438333032653934326433616638366130613962373065613135 | |
6532656335663061353462303931623735303832313136620a353436633764333962396237626164 | |
31323530623366303930343235653266363163653462393730613965353965643033336431393439 | |
3932363733306331360a306161643934376364653266633339646235336334653039303836303438 | |
62653264333965316461336438303739323333363233353433383138323834353464616266303065 | |
35616135656231623537383032393361383162613565636534323765313035323935303662636565 | |
626439396363643432333234323831633330 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment