From 160939d887067a2e3c9bb56e09674b238ba6d98f Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Sat, 19 Mar 2016 14:43:10 -0700 Subject: [PATCH] Allow a defined but not dhcp addressing_mode In some work we're doing, we override addressing_mode with the string 'static'. This should lead to getting network_info.json in our configdrives, but it doesn't because the test logic in these tasks isn't right. It has been tested, and the undefined test short circuits, so we don't ever get errors whether the value is defined as dhcp, static, or undefined. Change-Id: I01f42c003dae21b3f25e2f760214ba876ae1aea9 --- playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml b/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml index ebde6a5cb..0a55cb41c 100644 --- a/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml @@ -49,12 +49,12 @@ network_mtu: "{{ network_mtu | default('1500') }}" nics: "{{ nics | default('') }}" node_network_info: "{{ node_network_info | default('') }}" - when: addressing_mode is undefined and '"dhcp" not in addressing_mode' + when: addressing_mode is undefined or "dhcp" not in addressing_mode - name: "Place network info template in each openstack/latest folder" template: src: network_info.json.j2 dest: "{{ variable_configdrive_location.stdout }}/{{ uuid }}/openstack/latest/network_info.json" - when: addressing_mode is undefined and '"dhcp" not in addressing_mode' + when: addressing_mode is undefined or "dhcp" not in addressing_mode - name: "Make metadata folder - /openstack/latest" file: state: directory