Skip to content

Commit 6b51cfa

Browse files
authored
Adds variables for setting OpenStack region to all resources (#67)
* Adds variables for setting OpenStack region to all resources * Remove duplicated variable * Align with naming in os_images os_images using os_images_region and not region_name. * Correct projects region * Add variable in os_volumes README
1 parent da4ce36 commit 6b51cfa

File tree

17 files changed

+39
-0
lines changed

17 files changed

+39
-0
lines changed

roles/os_container_clusters/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ virtualenv.
2121
`os_container_clusters_auth` is a dict containing authentication information
2222
compatible with the `auth` argument of `openstack.cloud` Ansible modules.
2323

24+
`os_container_clusters_region` is an optional name of an OpenStack region.
25+
2426
`os_container_clusters_cacert` is an optional path to a CA certificate bundle.
2527

2628
`os_container_clusters_templates` is a list of Magnum container cluster

roles/os_container_clusters/tasks/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
ansible_python_interpreter: "{{ os_container_clusters_venv ~ '/bin/python' if os_container_clusters_venv != None else old_ansible_python_interpreter }}"
1616
openstack.cloud.coe_cluster_template:
1717
auth: "{{ os_container_clusters_auth }}"
18+
region_name: "{{ os_container_clusters_region | default(omit) }}"
1819
auth_type: "{{ os_container_clusters_auth_type }}"
1920
cacert: "{{ os_container_clusters_cacert | default(omit) }}"
2021
interface: "{{ os_container_clusters_interface | default(omit, true) }}"

roles/os_deploy_templates/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ the `auth_type` argument of `openstack.cloud` Ansible modules.
2727
`os_deploy_templates_auth` is a dict containing authentication information
2828
compatible with the `auth` argument of `openstack.cloud` Ansible modules.
2929

30+
`os_deploy_templates_region` is an optional name of an OpenStack region.
31+
3032
`os_deploy_templates_cacert` is an optional path to a CA certificate bundle.
3133

3234
`os_deploy_templates_interface` is the endpoint URL type to fetch from the service

roles/os_deploy_templates/tasks/deploy_templates.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
openstack.cloud.baremetal_deploy_template:
44
auth_type: "{{ os_deploy_templates_auth_type }}"
55
auth: "{{ os_deploy_templates_auth }}"
6+
region_name: "{{ os_deploy_templates_region | default(omit) }}"
67
cacert: "{{ os_deploy_templates_cacert | default(omit) }}"
78
interface: "{{ os_deploy_templates_interface | default(omit, true) }}"
89
name: "{{ item.name | default(omit) }}"

roles/os_flavors/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ the `auth_type` argument of `openstack.cloud` Ansible modules.
2121
`os_flavors_auth` is a dict containing authentication information
2222
compatible with the `auth` argument of `openstack.cloud` Ansible modules.
2323

24+
`os_flavors_region` is an optional name of an OpenStack region.
25+
2426
`os_flavors_cacert` is an optional path to a CA certificate bundle.
2527

2628
`os_flavors_interface` is the endpoint URL type to fetch from the service

roles/os_flavors/tasks/flavors.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
openstack.cloud.compute_flavor:
44
auth_type: "{{ os_flavors_auth_type }}"
55
auth: "{{ os_flavors_auth }}"
6+
region_name: "{{ os_flavors_region | default(omit) }}"
67
cacert: "{{ os_flavors_cacert | default(omit) }}"
78
interface: "{{ os_flavors_interface | default(omit, true) }}"
89
name: "{{ item.name }}"
@@ -22,6 +23,7 @@
2223
openstack.cloud.compute_flavor_access:
2324
auth_type: "{{ os_flavors_auth_type }}"
2425
auth: "{{ os_flavors_auth }}"
26+
region_name: "{{ os_flavors_region | default(omit) }}"
2527
cacert: "{{ os_flavors_cacert | default(omit) }}"
2628
interface: "{{ os_flavors_interface | default(omit, true) }}"
2729
name: "{{ item.0.name }}"

roles/os_host_aggregates/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ virtualenv.
2121
`os_host_aggregates_auth` is a dict containing authentication information
2222
compatible with the `auth` argument of `openstack.cloud` Ansible modules.
2323

24+
`os_host_aggregates_region` is an optional name of an OpenStack region.
25+
2426
`os_host_aggregates_cacert` is an optional path to a CA certificate bundle.
2527

2628
`os_host_aggregates_interface` is the endpoint URL type to fetch from the

roles/os_host_aggregates/tasks/host-aggregates.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
openstack.cloud.host_aggregate:
44
auth_type: "{{ os_host_aggregates_auth_type }}"
55
auth: "{{ os_host_aggregates_auth }}"
6+
region_name: "{{ os_host_aggregates_region | default(omit) }}"
67
cacert: "{{ os_host_aggregates_cacert | default(omit) }}"
78
interface: "{{ os_host_aggregates_interface | default(omit, true) }}"
89
name: "{{ item.name }}"

roles/os_networks/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Role Variables
2121
`os_networks_auth` is a dict containing authentication information
2222
compatible with the `auth` argument of `openstack.cloud` Ansible modules.
2323

24+
`os_networks_region` is an optional name of an OpenStack region.
25+
2426
`os_networks_cacert` is an optional path to a CA certificate bundle.
2527

2628
`os_networks_cloud` is an optional name of a cloud in `clouds.yaml`.

roles/os_networks/tasks/networks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
openstack.cloud.router:
44
auth_type: "{{ os_networks_auth_type }}"
55
auth: "{{ os_networks_auth }}"
6+
region_name: "{{ os_networks_region | default(omit) }}"
67
cacert: "{{ os_networks_cacert | default(omit) }}"
78
cloud: "{{ os_networks_cloud | default(omit) }}"
89
interface: "{{ os_networks_interface | default(omit, true) }}"
@@ -16,6 +17,7 @@
1617
openstack.cloud.network:
1718
auth_type: "{{ os_networks_auth_type }}"
1819
auth: "{{ os_networks_auth }}"
20+
region_name: "{{ os_networks_region | default(omit) }}"
1921
cacert: "{{ os_networks_cacert | default(omit) }}"
2022
cloud: "{{ os_networks_cloud | default(omit) }}"
2123
interface: "{{ os_networks_interface | default(omit, true) }}"
@@ -36,6 +38,7 @@
3638
openstack.cloud.subnet:
3739
auth_type: "{{ os_networks_auth_type }}"
3840
auth: "{{ os_networks_auth }}"
41+
region_name: "{{ os_networks_region | default(omit) }}"
3942
cacert: "{{ os_networks_cacert | default(omit) }}"
4043
cloud: "{{ os_networks_cloud | default(omit) }}"
4144
interface: "{{ os_networks_interface | default(omit, true) }}"
@@ -72,6 +75,7 @@
7275
# openstack.cloud.router:
7376
# auth_type: "{{ os_networks_auth_type }}"
7477
# auth: "{{ os_networks_auth }}"
78+
# region_name: "{{ os_networks_region | default(omit) }}"
7579
# cacert: "{{ os_networks_cacert | default(omit) }}"
7680
# cloud: "{{ os_networks_cloud | default(omit) }}"
7781
# interface: "{{ os_networks_interface | default(omit, true) }}"
@@ -100,6 +104,7 @@
100104
openstack.cloud.security_group:
101105
auth_type: "{{ os_networks_auth_type }}"
102106
auth: "{{ os_networks_auth }}"
107+
region_name: "{{ os_networks_region | default(omit) }}"
103108
cacert: "{{ os_networks_cacert | default(omit) }}"
104109
cloud: "{{ os_networks_cloud | default(omit) }}"
105110
interface: "{{ os_networks_interface | default(omit, true) }}"
@@ -114,6 +119,7 @@
114119
openstack.cloud.security_group_rule:
115120
auth_type: "{{ os_networks_auth_type }}"
116121
auth: "{{ os_networks_auth }}"
122+
region_name: "{{ os_networks_region | default(omit) }}"
117123
cacert: "{{ os_networks_cacert | default(omit) }}"
118124
cloud: "{{ os_networks_cloud | default(omit) }}"
119125
interface: "{{ os_networks_interface | default(omit, true) }}"

0 commit comments

Comments
 (0)