ansible - One or more undefined variables: 'dict object' has no attribute 'ansible_ssh_host' -
i trying install openstack using ansible aio, ran bootstrap-ansible.sh
, bootstrap-aio.sh
scripts , updated openstack_user_config.yml, user_variables.yml
files, started run-playbook.sh
script, failed following error:
task: [openstack_hosts | drop hosts file entries script] *********************
fatal: [...] => {'msg': "ansibleundefinedvariable: 1 or more undefined variables: 'dict object' has no attribute 'ansible_ssh_host'", 'failed': true}
fatal: [...] => {'msg': "ansibleundefinedvariable: 1 or more undefined variables: 'dict object' has no attribute 'ansible_ssh_host'", 'failed': true}
can please find issue occurs , how fix ?
i fixed same problem on docker :)
the 'dict object'
referring dictionary object created user_variables.yml
file (possibly because ansible compiler uses python, i'm not sure).
basically, 'ansible_ssh_host'
must inner field of top level object in user_variables.yml
either being set incorrectly or called incorrectly.
to fix problem:
- check if value of
'ansible_ssh_host'
exists. (for me, doinghost : "a.b.c"
when should have been doinghost : "a.b.x.c"
. - check if
'ansible_ssh_host'
spelled correctly. - check if
user_variables.yml
has no syntax errors: "---" @ top, outer level object no whitespaces, inner level pairing start 2 whitespaces, outside called variables use syntaxvar : "{{a.b.x.c}}"
hope helps.
Comments
Post a Comment