Skip to content
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
9 changes: 9 additions & 0 deletions hooks/playbooks/adoption_ironic_post_oc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
_subnet_gateway: '172.20.1.1'
_subnet_alloc_pool_start: '172.20.1.150'
_subnet_alloc_pool_end: '172.20.1.199'
_subnet_ip_version: 4
_provider_physical_network: ironic
_provider_network_type: flat
tasks:
Expand Down Expand Up @@ -156,6 +157,14 @@
--gateway {{ _subnet_gateway }} \
--allocation-pool start={{ _subnet_alloc_pool_start }},end={{ _subnet_alloc_pool_end }}

- name: Create router and attach subnet for IPv6 provisioning network
ansible.builtin.shell:
cmd: >-
openstack router show provisioning &>/dev/null || \
(openstack router create provisioning && \
openstack router add subnet provisioning provisioning-subnet)
when: _subnet_ip_version | int == 6

- name: Slurp ironic_nodes.yaml from controller-0
delegate_to: controller-0
register: _ironic_nodes_slurp
Expand Down
10 changes: 10 additions & 0 deletions hooks/playbooks/ironic_network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,13 @@
--gateway {{ _subnet_gateway }} \
--dns-nameserver {{ _subnet_nameserver }} \
--allocation-pool start={{ _subnet_alloc_pool_start }},end={{ _subnet_alloc_pool_end }}

- name: Create router for IPv6 provisioning network
ansible.builtin.shell: |
set -xe -o pipefail
oc project {{ _namespace }}
oc rsh openstackclient \
openstack router create provisioning
oc rsh openstackclient \
openstack router add subnet provisioning provisioning-subnet
when: _subnet_ip_version | int == 6