From 5950d99f46388f6e4bb5800fe19719654d7080f8 Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Wed, 1 Mar 2017 15:34:09 +0000 Subject: [PATCH] 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 --- tasks/nova_compute_wait.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/nova_compute_wait.yml b/tasks/nova_compute_wait.yml index 4e08f08a..9eae9fe0 100644 --- a/tasks/nova_compute_wait.yml +++ b/tasks/nova_compute_wait.yml @@ -19,7 +19,7 @@ register: nova_service_list retries: 10 delay: 5 - until: "{{ ansible_hostname in (nova_service_list.stdout + until: "{{ ansible_nodename in (nova_service_list.stdout | from_json | selectattr('Binary', 'equalto', 'nova-compute') | map(attribute='Host') | list) }}"