mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
OpenStack: Support multiple subnets
- Flag primary cluster subnet. - Attaches bootstrap floating ip to correct subnet.
This commit is contained in:
@@ -38,5 +38,6 @@
|
||||
- name: 'Create the bootstrap floating IP'
|
||||
os_floating_ip:
|
||||
state: present
|
||||
nat_destination: "{{ os_network }}"
|
||||
network: "{{ os_external_network }}"
|
||||
server: "{{ os_bootstrap_server_name }}"
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
- name: 'Compute resource names'
|
||||
set_fact:
|
||||
cluster_id_tag: "openshiftClusterID={{ infraID }}"
|
||||
primary_cluster_network_tag: "{{ infraID }}-primaryClusterNetwork"
|
||||
os_infra_id: "{{ infraID }}"
|
||||
os_network: "{{ infraID }}-network"
|
||||
os_subnet: "{{ infraID }}-nodes"
|
||||
|
||||
@@ -11,15 +11,15 @@
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
- name: 'Create the cluster network'
|
||||
- name: 'Create the primary cluster network'
|
||||
os_network:
|
||||
name: "{{ os_network }}"
|
||||
|
||||
- name: 'Set the cluster network tag'
|
||||
- name: 'Set tags on the primary cluster network'
|
||||
command:
|
||||
cmd: "openstack network set --tag {{ cluster_id_tag }} {{ os_network }}"
|
||||
cmd: "openstack network set --tag {{ primary_cluster_network_tag }} --tag {{ cluster_id_tag }} {{ os_network }}"
|
||||
|
||||
- name: 'Create a subnet'
|
||||
- name: 'Create the primary cluster subnet'
|
||||
os_subnet:
|
||||
name: "{{ os_subnet }}"
|
||||
network_name: "{{ os_network }}"
|
||||
@@ -27,7 +27,7 @@
|
||||
allocation_pool_start: "{{ os_subnet_range | next_nth_usable(10) }}"
|
||||
allocation_pool_end: "{{ os_subnet_range | ipaddr('last_usable') }}"
|
||||
|
||||
- name: 'Set the cluster subnet tag'
|
||||
- name: 'Set tags on primary cluster subnet'
|
||||
command:
|
||||
cmd: "openstack subnet set --tag {{ cluster_id_tag }} {{ os_subnet }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user