1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 06:46:36 +01:00

OpenStack: Determine dualstack installation by value

Check os_subnet6 instead of os_subnet6_range to determine dual-stack
installation in UPI playbooks.
This commit is contained in:
Roman Dobosz
2023-11-23 13:03:16 +01:00
committed by Maysa Macedo
parent 3de486e441
commit 792a0cf79e
6 changed files with 14 additions and 26 deletions

View File

@@ -19,7 +19,7 @@
- "{{ os_sg_master }}"
allowed_address_pairs:
- ip_address: "{{ os_apiVIP }}"
when: os_subnet6_range is not defined
when: os_subnet6 is not defined
- name: 'Create the bootstrap dualstack server port'
os_port:
@@ -30,7 +30,7 @@
allowed_address_pairs:
- ip_address: "{{ os_apiVIP }}"
- ip_address: "{{ os_apiVIP6 }}"
when: os_subnet6_range is defined
when: os_subnet6 is defined
- name: 'Set bootstrap port tag'
command:

View File

@@ -21,7 +21,7 @@
- ip_address: "{{ os_ingressVIP }}"
with_indexed_items: "{{ [os_port_worker] * os_compute_nodes_number }}"
register: ports
when: os_subnet6_range is not defined
when: os_subnet6 is not defined
- name: 'Create the dualstack Compute ports'
openstack.cloud.port:
@@ -34,7 +34,7 @@
- ip_address: "{{ os_ingressVIP6 }}"
with_indexed_items: "{{ [os_port_worker] * os_compute_nodes_number }}"
register: ports
when: os_subnet6_range is defined
when: os_subnet6 is defined
- name: 'Set Compute ports tag'
ansible.builtin.command:

View File

@@ -22,7 +22,7 @@
- ip_address: "{{ os_ingressVIP }}"
with_indexed_items: "{{ [os_port_master] * os_cp_nodes_number }}"
register: ports
when: os_subnet6_range is not defined
when: os_subnet6 is not defined
- name: 'Create the dualstack Control Plane ports'
openstack.cloud.port:
@@ -37,7 +37,7 @@
- ip_address: "{{ os_ingressVIP6 }}"
with_indexed_items: "{{ [os_port_master] * os_cp_nodes_number }}"
register: ports
when: os_subnet6_range is defined
when: os_subnet6 is defined
- name: 'Set Control Plane ports tag'
ansible.builtin.command:

View File

@@ -30,9 +30,7 @@
ip_version: 6
ipv6_address_mode: "{{ os_subnet6_address_mode }}"
ipv6_ra_mode: "{{ os_subnet6_router_advertisements_mode }}"
when:
- os_subnet6_range is defined
- os_subnet6_range|ansible.utils.ipv6
when: os_subnet6 is defined
- name: 'Create external router'
openstack.cloud.router:
@@ -49,8 +47,7 @@
- "{{ os_subnet }}"
- "{{ os_subnet6 }}"
when:
- os_subnet6_range is defined
- os_subnet6_range|ansible.utils.ipv6
- os_subnet6 is defined
- os_external_network is defined and os_external_network|length>0
- name: 'Create the API port'
@@ -61,8 +58,7 @@
- subnet: "{{ os_subnet }}"
ip_address: "{{ os_apiVIP }}"
register: _api_ports
when:
- os_subnet6_range is not defined
when: os_subnet6 is not defined
- set_fact:
api_ports: "{{ _api_ports }}"
@@ -73,9 +69,7 @@
name: "{{ os_port_api }}"
network: "{{ os_network }}"
register: _api_ports
when:
- os_subnet6_range is defined
- os_subnet6_range|ansible.utils.ipv6
when: os_subnet6 is defined
- set_fact:
api_ports: "{{ _api_ports }}"
@@ -89,8 +83,7 @@
- subnet: "{{ os_subnet }}"
ip_address: "{{ os_ingressVIP }}"
register: _ingress_ports
when:
- os_subnet6_range is not defined
when: os_subnet6 is not defined
- set_fact:
ingress_ports: "{{ _ingress_ports }}"
@@ -101,9 +94,7 @@
name: "{{ os_port_ingress }}"
network: "{{ os_network }}"
register: _ingress_ports
when:
- os_subnet6_range is defined
- os_subnet6_range|ansible.utils.ipv6
when: os_subnet6 is defined
- set_fact:
ingress_ports: "{{ _ingress_ports }}"

View File

@@ -373,5 +373,4 @@
when: os_master_schedulable is defined and os_master_schedulable
when:
- os_subnet6_range is defined
- os_subnet6_range|ansible.utils.ipv6
when: os_subnet6 is defined

View File

@@ -22,9 +22,7 @@
- name: 'Set tags on primary cluster subnet IPv6'
ansible.builtin.command:
cmd: "openstack subnet set --tag {{ cluster_id_tag }} {{ os_subnet6 }}"
when:
- os_subnet6_range is defined
- os_subnet6_range|ansible.utils.ipv6
when: os_subnet6 is defined
- name: 'Set tags on the API VIP port'
ansible.builtin.command: