Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix adoption_vars, only one defaultRoute #2653

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions roles/adoption_osp_deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ deployment. Defaults to `pool.ntp.org`
* `cifmw_adoption_osp_deploy_stopper`: (String) Step at which to stop the run. See `Break point` section below for possible values.
* `cifmw_adoption_osp_deploy_scenario`: (Dict) Define the parameter to
configure the OSP17.1 deployment.
* `cifmw_adoption_osp_deploy_adoption_vars_exclude_nets`: (List) Name of
networks in the ci-framework Network Mapper data to exclude when generating
the adoption variables. By default it excludes the ci-framework "public"
network (`ocpbm`).

### Break point

Expand Down
3 changes: 3 additions & 0 deletions roles/adoption_osp_deploy/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
pablintino marked this conversation as resolved.
Show resolved Hide resolved
- "{{ cifmw_libvirt_manager_pub_net | default('ocpbm') }}"
16 changes: 10 additions & 6 deletions roles/adoption_osp_deploy/templates/adoption_vars.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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([]) %}
Expand All @@ -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 %}

Expand Down