Seeing provisioning error while running the configure instances play:-
ansible-playbook -i inventory/ -e orchestrator=openstack playbooks/configure_instances.yml
ERROR:-
*****************************************
*****************************************
TASK [configure_instances : Build hosts file for rabbitmq with domain suffix when provided] ********************************************************************************************************
skipping: [10.204.216.99] => (item=[u'10.204.216.103', u'10.204.216.99'])
skipping: [10.204.216.103] => (item=[u'10.204.216.103', u'10.204.216.99'])
skipping: [10.204.216.96] => (item=[u'10.204.216.103', u'10.204.216.99'])
skipping: [10.204.216.98] => (item=[u'10.204.216.103', u'10.204.216.99'])
skipping: [10.204.216.97] => (item=[u'10.204.216.103', u'10.204.216.99'])
ok: [10.204.216.103] => (item=[u'10.204.216.103', u'10.204.216.103'])
skipping: [10.204.216.103] => (item=[u'10.204.216.103', u'10.204.216.96'])
ok: [10.204.216.99] => (item=[u'10.204.216.103', u'10.204.216.103'])
fatal: [10.204.216.103]: FAILED! => {"msg": "The conditional check 'item.0 in hostvars[item.1].ansible_all_ipv4_addresses' failed. The error was: error while evaluating conditional (item.0 in hostvars[item.1].ansible_all_ipv4_addresses): Unable to look up a name or access an attribute in template string ({% if item.0 in hostvars[item.1].ansible_all_ipv4_addresses %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable\n\nThe error appears to have been in '/tmp/ansible.5BU7Dz_contrail/contrail-ansible-deployer/playbooks/roles/configure_instances/tasks/install_software_Linux.yml': line 63, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"Build hosts file for rabbitmq with domain suffix when provided\"\n ^ here\n"}
skipping: [10.204.216.99] => (item=[u'10.204.216.103', u'10.204.216.96'])
fatal: [10.204.216.99]: FAILED! => {"msg": "The conditional check 'item.0 in hostvars[item.1].ansible_all_ipv4_addresses' failed. The error was: error while evaluating conditional (item.0 in hostvars[item.1].ansible_all_ipv4_addresses): Unable to look up a name or access an attribute in template string ({% if item.0 in hostvars[item.1].ansible_all_ipv4_addresses %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable\n\nThe error appears to have been in '/tmp/ansible.5BU7Dz_contrail/contrail-ansible-deployer/playbooks/roles/configure_instances/tasks/install_software_Linux.yml': line 63, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"Build hosts file for rabbitmq with domain suffix when provided\"\n ^ here\n"}
ok: [10.204.216.96] => (item=[u'10.204.216.103', u'10.204.216.103'])
ok: [10.204.216.98] => (item=[u'10.204.216.103', u'10.204.216.103'])
skipping: [10.204.216.96] => (item=[u'10.204.216.103', u'10.204.216.96'])
skipping: [10.204.216.98] => (item=[u'10.204.216.103', u'10.204.216.96'])
ok: [10.204.216.97] => (item=[u'10.204.216.103', u'10.204.216.103'])
fatal: [10.204.216.96]: FAILED! => {"msg": "The conditional check 'item.0 in hostvars[item.1].ansible_all_ipv4_addresses' failed. The error was: error while evaluating conditional (item.0 in hostvars[item.1].ansible_all_ipv4_addresses): Unable to look up a name or access an attribute in template string ({% if item.0 in hostvars[item.1].ansible_all_ipv4_addresses %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable\n\nThe error appears to have been in '/tmp/ansible.5BU7Dz_contrail/contrail-ansible-deployer/playbooks/roles/configure_instances/tasks/install_software_Linux.yml': line 63, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"Build hosts file for rabbitmq with domain suffix when provided\"\n ^ here\n"}
fatal: [10.204.216.98]: FAILED! => {"msg": "The conditional check 'item.0 in hostvars[item.1].ansible_all_ipv4_addresses' failed. The error was: error while evaluating conditional (item.0 in hostvars[item.1].ansible_all_ipv4_addresses): Unable to look up a name or access an attribute in template string ({% if item.0 in hostvars[item.1].ansible_all_ipv4_addresses %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable\n\nThe error appears to have been in '/tmp/ansible.5BU7Dz_contrail/contrail-ansible-deployer/playbooks/roles/configure_instances/tasks/install_software_Linux.yml': line 63, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"Build hosts file for rabbitmq with domain suffix when provided\"\n ^ here\n"}
skipping: [10.204.216.97] => (item=[u'10.204.216.103', u'10.204.216.96'])
fatal: [10.204.216.97]: FAILED! => {"msg": "The conditional check 'item.0 in hostvars[item.1].ansible_all_ipv4_addresses' failed. The error was: error while evaluating conditional (item.0 in hostvars[item.1].ansible_all_ipv4_addresses): Unable to look up a name or access an attribute in template string ({% if item.0 in hostvars[item.1].ansible_all_ipv4_addresses %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'StrictUndefined' is not iterable\n\nThe error appears to have been in '/tmp/ansible.5BU7Dz_contrail/contrail-ansible-deployer/playbooks/roles/configure_instances/tasks/install_software_Linux.yml': line 63, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"Build hosts file for rabbitmq with domain suffix when provided\"\n ^ here\n"}
to retry, use: --limit @/tmp/ansible.5BU7Dz_contrail/contrail-ansible-deployer/playbooks/configure_instances.retry
*****************************************
*****************************************
Instances.yaml
*****************************************
*****************************************
global_configuration:
REGISTRY_PRIVATE_INSECURE: True
CONTAINER_REGISTRY: 10.204.217.152:5000
provider_config:
bms:
domainsuffix: englab.juniper.net
ntpserver: 10.204.217.158
ssh_pwd: c0ntrail123
ssh_user: root
instances:
nodem10:
ip: 10.204.216.99
provider: bms
roles:
openstack_compute: null
vrouter:
PHYSICAL_INTERFACE: ens2f1
nodem14:
ip: 10.204.216.103
provider: bms
roles:
analytics: null
analytics_database: null
config: null
config_database: null
control: null
openstack: null
webui: null
nodem6:
ip: 10.204.216.95
provider: bms
roles:
analytics: null
analytics_database: null
config: null
config_database: null
control: null
openstack: null
webui: null
nodem7:
ip: 10.204.216.96
provider: bms
roles:
analytics: null
analytics_database: null
config: null
config_database: null
control: null
openstack: null
webui: null
nodem8:
ip: 10.204.216.97
provider: bms
roles:
openstack_compute: null
vrouter:
PHYSICAL_INTERFACE: bond0
nodem9:
ip: 10.204.216.98
provider: bms
roles:
openstack_compute: null
vrouter:
PHYSICAL_INTERFACE: ens2f1
contrail_configuration:
CONTRAIL_VERSION: ocata-5.0-198
CLOUD_ORCHESTRATOR: openstack
METADATA_PROXY_SECRET: c0ntrail123
OPENSTACK_NODES: 10.204.216.103,10.204.216.95,10.204.216.96
CONTROLLER_NODES: 10.204.216.103,10.204.216.95,10.204.216.96
AUTH_MODE: keystone
KEYSTONE_AUTH_ADMIN_PASSWORD: c0ntrail123
KEYSTONE_AUTH_URL_VERSION: "/v3"
RABBITMQ_NODE_PORT: 5673
KEYSTONE_AUTH_HOST: 10.204.216.140
IPFABRIC_SERVICE_HOST: 10.204.216.140
AAA_MODE: rbac
CLOUD_ORCHESTRATOR: openstack
CONFIG_API_VIP: 10.204.216.103
CONTAINER_REGISTRY: 10.204.217.152:5000
CONTRAIL_VERSION: ocata-5.0-198
CONTROLLER_NODES: 10.204.216.103,10.204.216.95,10.204.216.96
CONTROL_NODES: 10.10.10.14,10.10.10.6,10.10.10.7
ENCAP_PRIORITY: VXLAN,MPLSoUDP,MPLSoGRE
IPFABRIC_SERVICE_HOST: 10.204.216.140
KEYSTONE_AUTH_ADMIN_PASSWORD: c0ntrail123
KEYSTONE_AUTH_HOST: 10.204.216.140
KEYSTONE_AUTH_URL_VERSION: /v3
OPENSTACK_NODES: 10.204.216.103,10.204.216.95,10.204.216.96
RABBITMQ_NODE_PORT: 5673
REGISTRY_PRIVATE_INSECURE: true
VROUTER_GATEWAY: 10.10.10.101
XMPP_SSL_ENABLE: true
kolla_config:
kolla_globals:
kolla_internal_vip_address: 10.204.216.140
kolla_external_vip_address: 10.204.216.140
contrail_api_interface_address: 10.204.216.103
keepalived_virtual_router_id: 213
enable_haproxy: yes
docker_registry: docker.io
docker_namespace: kolla
enable_ironic: no
enable_swift: "no"
kolla_passwords:
metadata_secret: c0ntrail123
keystone_admin_password: c0ntrail123
Please give access to the deployer node to debug this issue. We have observed this happens when there is an error for one of the hosts earlier in the play for some task. That is the root cause of the issue.