# Using vaulted variables with extra variables UI playbook

**URL:** <https://forum.ansible.com/t/using-vaulted-variables-with-extra-variables-ui-playbook/28741>\
**Category:** AWX Project\
**Tags:** windows\
**Created:** [October 8, 2018, 10:34am UTC](https://forum.ansible.com/t/using-vaulted-variables-with-extra-variables-ui-playbook/28741 "2018-10-08T10:34:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh\_B](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Josh\_B](https://forum.ansible.com/u/Josh_B)\
**Post date:** [October 8, 2018, 10:34am UTC](https://forum.ansible.com/t/using-vaulted-variables-with-extra-variables-ui-playbook/28741/1 "2018-10-08T10:34:46Z")

</div>

Hello everyone,

I am trying to vault out the remote user and remote password in my playbooks for machine builds. It seems that these variables need to be in the extra variables section for Windows builds. Is there a way I can pass these not in clear text? I tried to include my vaulted file in the extra variables as well as turning ansible\_user and password into variables from that vaulted file. But I receive this error.

fatal: [xxx.xxx.xxx.xxx]: FAILED! =\> {“msg”: “The field ‘remote\_user’ has an invalid value, which includes an undefined variable. The error was: ‘build\_user’ is undefined”}

Here is my extra vars section:

— include\_vars: vault\_file.yml ansible\_user: “{{ build\_user }}” ansible\_password: “{{ build\_password }}” ansible\_connection: winrm ansible\_winrm\_transport: basic ansible\_port: 5986 ansible\_winrm\_server\_cert\_validation: ignore ansible\_winrm\_read\_timeout\_sec: 700 ansible\_winrm\_operation\_timeout\_sec: 300

build\_user and build password are stored in vault\_file.yml

Any help will be appreciated.

Thanks!

Josh

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [October 8, 2018, 12:42pm UTC](https://forum.ansible.com/t/using-vaulted-variables-with-extra-variables-ui-playbook/28741/2 "2018-10-08T12:42:49Z")

</div>

[https://docs.ansible.com/ansible-tower/latest/html/release-notes/relnotes.html#ansible-tower-version-3-3-0](https://docs.ansible.com/ansible-tower/latest/html/release-notes/relnotes.html#ansible-tower-version-3-3-0)

Use the paramter ALLOW\_JINJA\_IN\_EXTRA\_VARS Further information in the release notes above. Basically, it’s a security problem to allow jinja2 in the extra vars.

---

<div class="post-metadata">

**Author:** ![Josh\_B](https://avatars.discourse-cdn.com/v4/letter/j/8797f3/32.png) [@Josh\_B](https://forum.ansible.com/u/Josh_B)\
**Post date:** [October 8, 2018, 2:42pm UTC](https://forum.ansible.com/t/using-vaulted-variables-with-extra-variables-ui-playbook/28741/3 "2018-10-08T14:42:07Z")

</div>

Thanks @Christopher. I will try this and revert.
