From 0ce8c23ccfb36870002ff68bf5df5709865107b9 Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Sat, 19 Mar 2016 16:45:34 -0700 Subject: [PATCH] Fix nics typing in configdrive generation network_metadata's parameter "nics" is expected to be a list. In some instances it will be left as a string unless the type is explicitly set. Also the default of '' is incorrect since a string is not expected but a list. Omitting it is the correct way, since it is not rquired. Change-Id: If3376ee24507ed6f22e269e4440d2e371ff33eb4 --- playbooks/library/network_metadata.py | 2 +- playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playbooks/library/network_metadata.py b/playbooks/library/network_metadata.py index 106a27530..e320c201b 100644 --- a/playbooks/library/network_metadata.py +++ b/playbooks/library/network_metadata.py @@ -33,7 +33,7 @@ def main(): ipv4_subnet_mask=dict(required=False), vlan_id=dict(required=False), network_mtu=dict(required=False), - nics=dict(required=False), + nics=dict(required=False, type='list'), node_network_info=dict(required=False) ) diff --git a/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml b/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml index ebde6a5cb..6a9e9d575 100644 --- a/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml +++ b/playbooks/roles/bifrost-configdrives-dynamic/tasks/main.yml @@ -47,7 +47,7 @@ ipv4_subnet_mask: "{{ ipv4_subnet_mask | default('') }}" vlan_id: "{{ vlan_id | default('') }}" network_mtu: "{{ network_mtu | default('1500') }}" - nics: "{{ nics | default('') }}" + nics: "{{ nics | default(omit) }}" node_network_info: "{{ node_network_info | default('') }}" when: addressing_mode is undefined and '"dhcp" not in addressing_mode' - name: "Place network info template in each openstack/latest folder"