mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 06:46:36 +01:00
We experienced issues caused by network resources created with the same name, which makes ansible playbooks to behave differently. Due to fact, that there is not yet OpenShift infraID accessible on the stage of creating network resources, there is a need to create deployment unique identifier in some other way. This patch implements generating such identifier independent from OpenShift deployment id. Co-authored-by: Maysa De Macedo Souza <maysa.macedo95@gmail.com>
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
# Required Python packages:
|
|
#
|
|
# ansible
|
|
# openstackclient
|
|
# openstacksdk
|
|
# netaddr
|
|
|
|
- ansible.builtin.import_playbook: common.yaml
|
|
|
|
- hosts: all
|
|
gather_facts: no
|
|
|
|
tasks:
|
|
- name: 'Create the bootstrap server port'
|
|
os_port:
|
|
name: "{{ os_port_bootstrap }}"
|
|
network: "{{ os_network }}"
|
|
security_groups:
|
|
- "{{ os_sg_master }}"
|
|
allowed_address_pairs:
|
|
- ip_address: "{{ os_apiVIP }}"
|
|
when: os_subnet6_range is not defined
|
|
|
|
- name: 'Create the bootstrap dualstack server port'
|
|
os_port:
|
|
name: "{{ os_port_bootstrap }}"
|
|
network: "{{ os_network }}"
|
|
security_groups:
|
|
- "{{ os_sg_master }}"
|
|
allowed_address_pairs:
|
|
- ip_address: "{{ os_apiVIP }}"
|
|
- ip_address: "{{ os_apiVIP6 }}"
|
|
when: os_subnet6_range is defined
|
|
|
|
- name: 'Set bootstrap port tag'
|
|
command:
|
|
cmd: "openstack port set --tag {{ cluster_id_tag }} {{ os_port_bootstrap }}"
|
|
|
|
- name: 'Set bootstrap auto_ip to false'
|
|
ansible.builtin.set_fact:
|
|
bootstrap_auto_ip: false
|
|
when: os_bootstrap_fip is not defined
|
|
|
|
- name: 'Create the bootstrap server'
|
|
os_server:
|
|
name: "{{ os_bootstrap_server_name }}"
|
|
image: "{{ os_image_rhcos }}"
|
|
flavor: "{{ os_flavor_master }}"
|
|
userdata: "{{ lookup('file', os_bootstrap_ignition) | string }}"
|
|
floating_ips: "{{ os_bootstrap_fip | default(omit) }}"
|
|
auto_ip: "{{ bootstrap_auto_ip | default(omit) }}"
|
|
nics:
|
|
- port-name: "{{ os_port_bootstrap }}"
|
|
meta: "{{ cluster_id_tag }}"
|