# Passing encrypted password to playbook using --ask-become-pass option

**URL:** <https://forum.ansible.com/t/passing-encrypted-password-to-playbook-using-ask-become-pass-option/33628>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [August 17, 2020, 11:34am UTC](https://forum.ansible.com/t/passing-encrypted-password-to-playbook-using-ask-become-pass-option/33628 "2020-08-17T11:34:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kumaresh\_kulal](https://avatars.discourse-cdn.com/v4/letter/k/3bc359/32.png) [@Kumaresh\_kulal](https://forum.ansible.com/u/Kumaresh_kulal)\
**Post date:** [August 17, 2020, 11:34am UTC](https://forum.ansible.com/t/passing-encrypted-password-to-playbook-using-ask-become-pass-option/33628/1 "2020-08-17T11:34:46Z")

</div>

Hello,

I am trying to pass the encrypted password to execute my playbook and while doing so I see below error.

Error: FAILED! =\> {“msg”: “The field ‘become\_pass’ has an invalid value, which includes an undefined variable. The error was: ‘ansible\_password’ is undefined”}

My Host file named hosts:

[windows]

192.168.1.113 ##windows 10

[windows:vars]

ansible\_user=domainnet\xyzaccount

ansible\_become=yes # use sudo

ansible\_become\_method=sudo

ansible\_become\_password=‘{{ ansible\_password }}’

ansible\_connection=winrm

#ansible\_port=5985

ansible\_winrm\_transport=ntlm

ansible\_winrm\_server\_cert\_validation=ignore

Encrypted data file named passwd.yml:
