summaryrefslogtreecommitdiff
path: root/docsite
diff options
context:
space:
mode:
authorMatt Martz <matt@sivel.net>2014-06-03 09:34:42 -0500
committerMatt Martz <matt@sivel.net>2014-06-24 15:02:24 -0500
commit19f5ce2c9c86d665466f4f82668de8e769d63aa1 (patch)
treeb7d4c856cab48025ce836dcf60af49c6350ec948 /docsite
parent375edbd087afa41a7331a2638c37509bade1af1a (diff)
downloadansible-19f5ce2c9c86d665466f4f82668de8e769d63aa1.tar.gz
Allow --vault-password-file to work with a script as well as a flat file
Diffstat (limited to 'docsite')
-rw-r--r--docsite/rst/playbooks_vault.rst6
1 files changed, 5 insertions, 1 deletions
diff --git a/docsite/rst/playbooks_vault.rst b/docsite/rst/playbooks_vault.rst
index 991c58f16c..934ca15082 100644
--- a/docsite/rst/playbooks_vault.rst
+++ b/docsite/rst/playbooks_vault.rst
@@ -83,12 +83,16 @@ To run a playbook that contains vault-encrypted data files, you must pass one of
This prompt will then be used to decrypt (in memory only) any vault encrypted files that are accessed. Currently this requires that all passwords be encrypted with the same password.
-Alternatively, passwords can be specified with a file. If this is done, be careful to ensure permissions on the file are such that no one else can access your key, and do not add your key to source control::
+Alternatively, passwords can be specified with a file or a script. If this is done, be careful to ensure permissions on the file are such that no one else can access your key, and do not add your key to source control::
ansible-playbook site.yml --vault-password-file ~/.vault_pass.txt
+ ansible-playbook site.yml --vault-password-file ~/.vault_pass.py
+
The password should be a string stored as a single line in the file.
+If you are using a script instead of a flat file, ensure that it is marked as executable, and that the password is printed to STDOUT. If your script needs to prompt for data, prompts can be sent to STDERR.
+
This is likely something you may wish to do if using Ansible from a continuous integration system like Jenkins.
(The `--vault-password-file` option can also be used with the :ref:`ansible-pull` command if you wish, though this would require distributing the keys to your nodes, so understand the implications -- vault is more intended for push mode).