Fix DHCP use case

Corrects the variables defined for template expansion to have
an empty default which allows for users to utilize the DHCP
use case as well as an inventory driven from Ironic it's self.

Change-Id: I71972e65570aa1e6245522bec6f6263a5d10396c
Closes-Bug: #1506606
This commit is contained in:
Julia Kreger 2015-10-15 20:16:20 -04:00
parent af7d9ac2e9
commit 6287c98d69

View File

@ -32,15 +32,16 @@
local_action: template src=openstack_meta_data.json.j2 dest={{ variable_configdrive_location.stdout }}/{{ uuid }}/openstack/latest/meta_data.json local_action: template src=openstack_meta_data.json.j2 dest={{ variable_configdrive_location.stdout }}/{{ uuid }}/openstack/latest/meta_data.json
- name: "Generate network_info" - name: "Generate network_info"
network_metadata: network_metadata:
ipv4_address: "{{ ipv4_address }}" ipv4_address: "{{ ipv4_address | default('') }}"
ipv4_gateway: "{{ ipv4_gateway }}" ipv4_gateway: "{{ ipv4_gateway | default('') }}"
ipv4_interface_mac: "{{ ipv4_interface_mac | default('') }}" ipv4_interface_mac: "{{ ipv4_interface_mac | default('') }}"
ipv4_nameserver: "{{ ipv4_nameserver }}" ipv4_nameserver: "{{ ipv4_nameserver | default('') }}"
ipv4_subnet_mask: "{{ ipv4_subnet_mask }}" ipv4_subnet_mask: "{{ ipv4_subnet_mask | default('') }}"
vlan_id: "{{ vlan_id | default('') }}" vlan_id: "{{ vlan_id | default('') }}"
network_mtu: "{{ network_mtu }}" network_mtu: "{{ network_mtu | default('1500') }}"
nics: "{{ nics }}" nics: "{{ nics | default('') }}"
node_network_info: "{{ node_network_info | default('') }}" 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" - name: "Place network info template in each openstack/latest folder"
local_action: template src=network_info.json.j2 dest={{ variable_configdrive_location.stdout }}/{{ uuid }}/openstack/latest/network_info.json local_action: 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 and '"dhcp" not in addressing_mode'