diff --git a/ansible/filter_plugins/networks.py b/ansible/filter_plugins/networks.py index 0490f0853..23ffeb635 100644 --- a/ansible/filter_plugins/networks.py +++ b/ansible/filter_plugins/networks.py @@ -78,6 +78,16 @@ def net_allocation_pool_end(context, name, inventory_hostname=None): return net_attr(context, name, 'allocation_pool_end', inventory_hostname) +@jinja2.contextfilter +def net_inspection_allocation_pool_start(context, name, inventory_hostname=None): + return net_attr(context, name, 'inspection_allocation_pool_start', inventory_hostname) + + +@jinja2.contextfilter +def net_inspection_allocation_pool_end(context, name, inventory_hostname=None): + return net_attr(context, name, 'inspection_allocation_pool_end', inventory_hostname) + + @jinja2.contextfilter def net_neutron_allocation_pool_start(context, name, inventory_hostname=None): return net_attr(context, name, 'neutron_allocation_pool_start', inventory_hostname) @@ -231,6 +241,8 @@ class FilterModule(object): 'net_gateway': net_gateway, 'net_allocation_pool_start': net_allocation_pool_start, 'net_allocation_pool_end': net_allocation_pool_end, + 'net_inspection_allocation_pool_start': net_inspection_allocation_pool_start, + 'net_inspection_allocation_pool_end': net_inspection_allocation_pool_end, 'net_neutron_allocation_pool_start': net_neutron_allocation_pool_start, 'net_neutron_allocation_pool_end': net_neutron_allocation_pool_end, 'net_vlan': net_vlan, diff --git a/ansible/kolla-bifrost.yml b/ansible/kolla-bifrost.yml index 294cf6ea4..4b7644fd0 100644 --- a/ansible/kolla-bifrost.yml +++ b/ansible/kolla-bifrost.yml @@ -36,8 +36,8 @@ kolla_bifrost_enable_pxe_drivers: false # Network configuration. - kolla_bifrost_dhcp_pool_start: "{{ provision_oc_net_name | net_allocation_pool_start }}" - kolla_bifrost_dhcp_pool_end: "{{ provision_oc_net_name | net_allocation_pool_end }}" + kolla_bifrost_dhcp_pool_start: "{{ provision_oc_net_name | net_inspection_allocation_pool_start }}" + kolla_bifrost_dhcp_pool_end: "{{ provision_oc_net_name | net_inspection_allocation_pool_end }}" kolla_bifrost_dnsmasq_router: "{{ provision_oc_net_name | net_gateway }}" kolla_bifrost_dnsmasq_dns_servers: "{{ resolv_nameservers | default([]) }}" kolla_bifrost_domain: "{{ resolv_domain | default }}" diff --git a/ansible/kolla-openstack.yml b/ansible/kolla-openstack.yml index 2616690d2..e8f1352b0 100644 --- a/ansible/kolla-openstack.yml +++ b/ansible/kolla-openstack.yml @@ -72,8 +72,8 @@ kolla_inspector_ipa_kernel_upstream_url: "{{ inspector_ipa_kernel_upstream_url }}" kolla_inspector_ipa_ramdisk_upstream_url: "{{ inspector_ipa_ramdisk_upstream_url }}" # Ironic inspector's dnsmasq configuration. - kolla_inspector_dhcp_pool_start: "{{ inspection_net_name | net_allocation_pool_start }}" - kolla_inspector_dhcp_pool_end: "{{ inspection_net_name | net_allocation_pool_end }}" + kolla_inspector_dhcp_pool_start: "{{ inspection_net_name | net_inspection_allocation_pool_start }}" + kolla_inspector_dhcp_pool_end: "{{ inspection_net_name | net_inspection_allocation_pool_end }}" # Extra free-form user-provided configuration. kolla_extra_glance: "{{ kolla_extra_config.glance | default }}" kolla_extra_inspector: "{{ kolla_extra_config.inspector | default }}" diff --git a/etc/kayobe/networks.yml b/etc/kayobe/networks.yml index 0c9469725..d5737a301 100644 --- a/etc/kayobe/networks.yml +++ b/etc/kayobe/networks.yml @@ -36,6 +36,8 @@ # provision_oc_net_cidr: # provision_oc_net_allocation_pool_start: # provision_oc_net_allocation_pool_end: +# provision_oc_net_inspection_allocation_pool_start: +# provision_oc_net_inspection_allocation_pool_end: # provision_oc_net_gateway: # provision_oc_net_vlan: # provision_oc_net_mtu: @@ -44,6 +46,8 @@ # provision_wl_net_cidr: # provision_wl_net_allocation_pool_start: # provision_wl_net_allocation_pool_end: +# provision_wl_net_inspection_allocation_pool_start: +# provision_wl_net_inspection_allocation_pool_end: # provision_wl_net_neutron_allocation_pool_start: # provision_wl_net_neutron_allocation_pool_end: # provision_wl_net_gateway: