Adjust ansible_hostname to ansible_nodename

ansible vars are as follows:
self.facts['hostname'] = platform.node().split('.')[0]
self.facts['nodename'] = platform.node()

We should use the "nodename" var instead of the hostname variable.

Closes-Bug: #1667193
Change-Id: Id98016cfffd30d2adaec058c861771f9aefe27b3
This commit is contained in:
Andy McCrae 2017-03-01 15:34:09 +00:00 committed by Amy Marrich (spotz)
parent 7c9a64b2ed
commit 5950d99f46

View File

@ -19,7 +19,7 @@
register: nova_service_list register: nova_service_list
retries: 10 retries: 10
delay: 5 delay: 5
until: "{{ ansible_hostname in (nova_service_list.stdout until: "{{ ansible_nodename in (nova_service_list.stdout
| from_json | from_json
| selectattr('Binary', 'equalto', 'nova-compute') | selectattr('Binary', 'equalto', 'nova-compute')
| map(attribute='Host') | list) }}" | map(attribute='Host') | list) }}"