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: