Open bentterp opened 6 years ago
I get this error too when running the ocp-ha-lab environment. It seems to be caused by the with_items: directive:
with_items: "{{ groups['all'] }}"
the 'all' group includes the localhost which you are running the playbook from. It does not have a public_ip_address fact. I solved this by manually setting the with_items to include the tag_Project group:
with_items: "{{ group['tag_Project_my_stack_name'] }}"
this worked for me and go me past this error.
TASK [Add all hosts to workdir ssh config file] ***** fatal: [localhost]: FAILED! => {"failed": true, "msg": "The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'private_ip_address'\n\nThe error appears to have been in '/home/bent/ansible_agnostic_deployer/ansible/cloud_providers/common_ssh_config_setup.yml': line 63, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - name: Add all hosts to workdir ssh config file\n ^ here\n"}