# ansible\_vault\_password\_file

**URL:** <https://forum.ansible.com/t/ansible-vault-password-file/22232>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [August 8, 2016, 8:06am UTC](https://forum.ansible.com/t/ansible-vault-password-file/22232 "2016-08-08T08:06:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fanvalt](https://avatars.discourse-cdn.com/v4/letter/f/2bfe46/32.png) [@fanvalt](https://forum.ansible.com/u/fanvalt)\
**Post date:** [August 8, 2016, 8:06am UTC](https://forum.ansible.com/t/ansible-vault-password-file/22232/1 "2016-08-08T08:06:00Z")

</div>

Hello,

I try to run a playbook to connect to a windows server with host external parameters set this way:

In my inventory file, I only want to set these parameter: ansible\_host and ansible\_user  
[windows]  
ansible\_host=server.fr.test ansible\_user=ansible

all parameters about connection are in the playbook/group\_vars/windows.yml file this way:

**ansible\_vault\_password\_file: ~/host\_vars/ansible.yml**  
ansible\_connection: winrm  
ansible\_port: 5986  
ansible\_winrm\_server\_cert\_validation: ignore

I had the ansible\_vault\_password\_file , so I hope when running the playbook, the password file will be found in the playbook/host\_vars/ansible.yml encrypted file.

But I receive the following error:

fatal: [test1]: UNREACHABLE! =\> {“changed”: false, “msg”: “ssl: auth method ssl requires a password”, “unreachable”: true}

if I set the password in the inventory file, the connection is ok.  
Where am I wrong ?

Regards

---

<div class="post-metadata">

**Author:** ![fanvalt](https://avatars.discourse-cdn.com/v4/letter/f/2bfe46/32.png) [@fanvalt](https://forum.ansible.com/u/fanvalt)\
**Post date:** [August 8, 2016, 8:19am UTC](https://forum.ansible.com/t/ansible-vault-password-file/22232/2 "2016-08-08T08:19:31Z")

</div>

with the -vvvvv option, it shows the group\_vars/windows.yml is correctly read, but the ansible\_vaut\_password\_file parameter seems to be useless:

TASK [setup] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
\<server.fr.test\> ESTABLISH WINRM CONNECTION FOR USER: ansible on PORT 5986 TO server.fr.test  
\<server.fr.test\> WINRM CONNECT: transport=ssl endpoint=[https://server.fr.test:5986/wsman](https://server.fr.test:5986/wsman)  
\<server.fr.test\> WINRM CONNECTION ERROR: auth method ssl requires a password

Here is the command to run the playbook:  
ansible-playbook -i ./win.ini -vvvvv connection.yml --ask-vault-pass

---

<div class="post-metadata">

**Author:** ![fanvalt](https://avatars.discourse-cdn.com/v4/letter/f/2bfe46/32.png) [@fanvalt](https://forum.ansible.com/u/fanvalt)\
**Post date:** [August 8, 2016, 8:35am UTC](https://forum.ansible.com/t/ansible-vault-password-file/22232/3 "2016-08-08T08:35:29Z")

</div>

The error does occur when running the parameter on the command line:  
ansible-playbook -i ./win.ini -vvvvv connection.yml --vault-password-file ~/windows\_vault/host\_vars/ansible.yml

I am running Ansible version 2.1.

---

<div class="post-metadata">

**Author:** ![fanvalt](https://avatars.discourse-cdn.com/v4/letter/f/2bfe46/32.png) [@fanvalt](https://forum.ansible.com/u/fanvalt)\
**Post date:** [August 8, 2016, 9:09am UTC](https://forum.ansible.com/t/ansible-vault-password-file/22232/4 "2016-08-08T09:09:29Z")

</div>

I misunderstood the utility of the ansible\_vaut\_password\_file parameter which is to point at the file containing the vault password and not the password to connect.  
I will rewrite the host\_vars and group\_vars files
