diff --git a/roles/adoption_osp_deploy/defaults/main.yml b/roles/adoption_osp_deploy/defaults/main.yml index ba25e8833b..b3feacd135 100644 --- a/roles/adoption_osp_deploy/defaults/main.yml +++ b/roles/adoption_osp_deploy/defaults/main.yml @@ -25,3 +25,6 @@ cifmw_adoption_osp_deploy_repos: - openstack-17.1-for-rhel-9-x86_64-rpms - fast-datapath-for-rhel-9-x86_64-rpms - rhceph-7-tools-for-rhel-9-x86_64-rpms + +cifmw_adoption_osp_deploy_adoption_vars_exclude_nets: + - "{{ cifmw_libvirt_manager_pub_net | default("ocpbm") }} diff --git a/roles/adoption_osp_deploy/templates/adoption_vars.yaml.j2 b/roles/adoption_osp_deploy/templates/adoption_vars.yaml.j2 index 1bf61a7aad..d0a581445f 100644 --- a/roles/adoption_osp_deploy/templates/adoption_vars.yaml.j2 +++ b/roles/adoption_osp_deploy/templates/adoption_vars.yaml.j2 @@ -29,11 +29,13 @@ edpm_nodes: ansible: ansibleHost: {{ node_nets.networks.ctlplane.ip_v4 }} networks: - {% for net in node_nets.networks.keys() %} - - defaultRoute: true - fixedIP: {{ node_nets.networks[net].ip_v4 }} + {% for net in node_nets.networks.keys() if net not in cifmw_adoption_osp_deploy_adoption_vars_exclude_nets %} + - fixedIP: {{ node_nets.networks[net].ip_v4 }} name: {{ net }} subnetName: subnet1 +{% if net == 'ctlplane' %} + defaultRoute: true +{% endif %} {% endfor %} {% endfor %} {% for networker in _vm_groups['osp-networkers'] | default([]) %} @@ -43,11 +45,13 @@ edpm_nodes: ansible: ansibleHost: {{ node_nets.networks.ctlplane.ip_v4 }} networks: - {% for net in node_nets.networks.keys() %} - - defaultRoute: true - fixedIP: {{ node_nets.networks[net].ip_v4 }} + {% for net in node_nets.networks.keys() if net not in cifmw_adoption_osp_deploy_adoption_vars_exclude_nets %} + - fixedIP: {{ node_nets.networks[net].ip_v4 }} name: {{ net }} subnetName: subnet1 +{% if net == 'ctlplane' %} + defaultRoute: true +{% endif %} {% endfor %} {% endfor %}