Can I specify ansible-password-vault-file in a playbook before running an include_vars ?

7 views
Skip to first unread message

Stephen Maher

unread,
May 15, 2020, 7:46:48 AM5/15/20
to Ansible Project
Hi,

I'm creating some playbooks that require some vaulted data and this is sourced dynamically. I am looking for a way to include the ansible password vault file before including this data, but without doing this on the command line, does anyone have a solution for this as I cannot seem to find anything in the code in 2.9 but I'm sure someone must have had this requirement before ?


Cheers

Steve Maher

Brian Coca

unread,
May 15, 2020, 10:47:02 AM5/15/20
to Ansible Project
it is not possible, vault secrets need to be provided at the start of
a run, before playbooks are even read. You CAN use lookups to access
data from other secure sources and those can take secrets at the time
the lookup is invoked.

--
----------
Brian Coca

Reply all
Reply to author
Forward
0 new messages