here is the content of inventory file, admin_pass is defined in secrets.yml
file,
[group1]
host1
[group1:vars]
ansible_become_pass={{admin_pass}}
the question is, how to reference variables defined in a file when running
ansible command? we tried the following but didn't work, can someone help?
$ ansible group1 -a "echo hello" -e "vars_files=secrets.yml"
host1 | FAILED | rc=0 >>
the field 'become_pass' has an invalid value, which appears to include a
variable that is undefined. The error was: 'admin_pass' is undefined
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/f685395a-479d-4180-86f9-bd92b3b70f3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.