From 22f81ada12c5a04e6bc225b1d5bcc14ab7cf815e Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Thu, 6 Jul 2017 10:14:17 +0100 Subject: [PATCH] Fix double conditional bug Currently there are two conditional statements on a single task, so only the last is applied. Change-Id: I48493b11f58476f0c3177335c8143e3a3fd06423 --- tasks/main.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index e10f9c33..fdb2a9a8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -53,20 +53,18 @@ - include: cinder_db_setup.yml static: no when: + - "groups['cinder_api'] | length > 0" - "'cinder_api' in group_names" - "inventory_hostname == ansible_play_hosts[0]" - when: - - groups['cinder_api'] | length > 0 tags: - cinder-config - include: cinder_service_setup.yml static: no when: + - "groups['cinder_api'] | length > 0" - "'cinder_api' in group_names" - "inventory_hostname == ansible_play_hosts[0]" - when: - - groups['cinder_api'] | length > 0 tags: - cinder-config @@ -80,10 +78,9 @@ - include: cinder_backends.yml static: no when: + - "groups['cinder_volume'] | length > 0" - "'cinder_volume' in group_names" - "inventory_hostname == ansible_play_hosts[0]" - when: - - groups['cinder_volume'] | length > 0 tags: - cinder-config