# Can I specify ansible-password-vault-file in a playbook before running an include\_vars ?

**URL:** <https://forum.ansible.com/t/can-i-specify-ansible-password-vault-file-in-a-playbook-before-running-an-include-vars/32938>\
**Category:** Ansible Project\
**Created:** [May 15, 2020, 11:46am UTC](https://forum.ansible.com/t/can-i-specify-ansible-password-vault-file-in-a-playbook-before-running-an-include-vars/32938 "2020-05-15T11:46:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahespth](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mahespth/32/252_2.png) [@mahespth](https://forum.ansible.com/u/mahespth)\
**Post date:** [May 15, 2020, 11:46am UTC](https://forum.ansible.com/t/can-i-specify-ansible-password-vault-file-in-a-playbook-before-running-an-include-vars/32938/1 "2020-05-15T11:46:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [May 15, 2020, 2:46pm UTC](https://forum.ansible.com/t/can-i-specify-ansible-password-vault-file-in-a-playbook-before-running-an-include-vars/32938/2 "2020-05-15T14:46:27Z")

</div>

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.
