Skip to content

Commit

Permalink
hook ironic_network - neutron availability zone
Browse files Browse the repository at this point in the history
Add variable _availability_zone_hints. Defaults to `[]`.
When a list of one or more availability zone hints are defined the
network create command includes the --availability-zone-hint option so
that the networks availability zone hints are set.
  • Loading branch information
hjensas authored and openshift-merge-bot[bot] committed Jun 17, 2024
1 parent 0bab6f5 commit 2ef6e09
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hooks/playbooks/ironic_network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
_subnet_alloc_pool_end: '172.20.1.200'
_provider_physical_network: ironic
_provider_network_type: flat
_availability_zone_hints: null # Comma separated list of strings
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
PATH: "{{ cifmw_path }}"
Expand All @@ -22,6 +23,11 @@
openstack network create provisioning \
--share \
--provider-physical-network {{ _provider_physical_network }} \
{% if _availability_zone_hints is not none -%}
{% for zone in _availability_zone_hints | split(',') -%}
--availability-zone-hint {{ zone }} \
{% endfor -%}
{% endif -%}
--provider-network-type {{ _provider_network_type }}
oc rsh openstackclient \
openstack subnet create provisioning-subnet \
Expand Down

0 comments on commit 2ef6e09

Please sign in to comment.