Make sure your variable name does not contain invalid characters like '-': the JSON object must be str, bytes or bytearray, not AnsibleUndefined. the JSON object must be str, bytes or bytearray, not AnsibleUndefined
The error appears to be in '/home/ubuntu/venvs/kolla-ansible/share/kolla-ansible/ansible/roles/nova-cell/tasks/wait_discover_computes.yml': line 47, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
# that failed to register.
- name: Fail if nova-compute service failed to register
^ here
This is the task at line 47:
# NOTE(mgoddard): Use a separate fail task to ensure we fail only those hosts
# that failed to register.
- name: Fail if nova-compute service failed to register
vars:
# 'Host' field of all registered compute services. nova_compute_service_hosts: >-
{{ hostvars[all_computes_in_batch[0]].nova_compute_services.stdout | from_json | map(attribute='Host') |
list }}
# 'Host' field of failed compute services. failed_compute_service_hosts: >-
{{ expected_compute_service_hosts | difference(nova_compute_service_hosts) | list }}
# Whether any compute services failed on this host. any_failed_services: >-
{{ ansible_facts.nodename in failed_compute_service_hosts or (ansible_facts.hostname ~ "-ironic") in failed_compute_service_hosts }}
fail:
msg: >-
The Nova compute service failed to register itself on the following
hosts: {{ failed_compute_service_hosts | join(',') }}
when: >- any_failed_services or (nova_compute_registration_fatal | bool and failed_compute_service_hosts | length > 0)
More details from that error:
Make sure your variable name does not contain invalid characters like '-': the JSON object must be str, bytes or bytearray, not AnsibleUndefined. the JSON object must be str, bytes or bytearray, not AnsibleUndefined
The error appears to be in '/home/ ubuntu/ venvs/kolla- ansible/ share/kolla- ansible/ ansible/ roles/nova- cell/tasks/ wait_discover_ computes. yml': line 47, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
# that failed to register.
- name: Fail if nova-compute service failed to register
^ here
This is the task at line 47:
# NOTE(mgoddard): Use a separate fail task to ensure we fail only those hosts
nova_compute_ service_ hosts: >- all_computes_ in_batch[ 0]].nova_ compute_ services. stdout |
from_ json |
map( attribute= 'Host') |
failed_ compute_ service_ hosts: >- compute_ service_ hosts | difference( nova_compute_ service_ hosts) | list }}
any_failed_ services: >- facts.nodename in failed_ compute_ service_ hosts or
( ansible_ facts.hostname ~ "-ironic") in failed_ compute_ service_ hosts }} compute_ service_ hosts | join(',') }}
any_failed_ services or
(nova_ compute_ registration_ fatal | bool and
failed_ compute_ service_ hosts | length > 0)
# that failed to register.
- name: Fail if nova-compute service failed to register
vars:
# 'Host' field of all registered compute services.
{{ hostvars[
list }}
# 'Host' field of failed compute services.
{{ expected_
# Whether any compute services failed on this host.
{{ ansible_
fail:
msg: >-
The Nova compute service failed to register itself on the following
hosts: {{ failed_
when: >-