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:

  1. check if value of 'ansible_ssh_host' exists. (for me, doing host : "a.b.c" when should have been doing host : "a.b.x.c".
  2. check if 'ansible_ssh_host' spelled correctly.
  3. 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 syntax var : "{{a.b.x.c}}"

hope helps.


Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -