From 1c9ff37fff2f49c8f0d019a6d3bbae262c44a777 Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Tue, 18 Jul 2017 12:16:40 -0700 Subject: [PATCH] Fix double conditional bug Currently there are two conditional statements on a single task, so only the last is applied. Change-Id: Ibc5c65b44005baacc43f7eb433097ec382d60bbd --- .../roles/bootstrap-host/tasks/prepare_networking.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/roles/bootstrap-host/tasks/prepare_networking.yml b/tests/roles/bootstrap-host/tasks/prepare_networking.yml index fcf55b63dc..f21e3c6141 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_networking.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_networking.yml @@ -97,14 +97,15 @@ - name: Shut down the network interfaces command: "ifdown {{ item.name }}" - when: osa_interfaces | changed or osa_multinode_interfaces | changed or network_interfaces_rhel | changed with_items: - { name: br-mgmt } - { name: br-storage } - { name: br-vlan } - { name: br-vxlan } - { name: br-dbaas, enabled: "{{ (bootstrap_host_scenario == 'translations') | bool }}" } - when: item.enabled | default(True) + when: + - osa_interfaces | changed or osa_multinode_interfaces | changed or network_interfaces_rhel | changed + - item.enabled | default(True) tags: - networking-interfaces-stop @@ -128,14 +129,15 @@ - name: Start the network interfaces command: "ifup {{ item.name }}" - when: osa_interfaces | changed or network_interfaces_rhel | changed with_items: - { name: br-mgmt } - { name: br-storage } - { name: br-vlan } - { name: br-vxlan } - { name: br-dbaas, enabled: "{{ (bootstrap_host_scenario == 'translations') | bool }}" } - when: item.enabled | default(True) + when: + - osa_interfaces | changed or network_interfaces_rhel | changed + - item.enabled | default(True) tags: - networking-interfaces-start