d9db42e5a9
This unifies approach for common resource management, like image uploads. With that we also split network creation with information fetch about it to include role only once and save execution time. Change-Id: Ib0126a0ac70aa613296a8d6e1ca61b34e22b02c2
38 lines
1.7 KiB
YAML
38 lines
1.7 KiB
YAML
---
|
|
# Copyright 2024, Cleura AB.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
- name: Set up the service network
|
|
ansible.builtin.include_role:
|
|
name: openstack.osa.openstack_resources
|
|
vars:
|
|
openstack_resources_setup_host: "{{ trove_service_setup_host }}"
|
|
openstack_resources_python_interpreter: "{{ trove_service_setup_host_python_interpreter }}"
|
|
_network_resources:
|
|
- name: "{{ trove_service_net_name }}"
|
|
network_type: "{{ trove_service_net_type }}"
|
|
physical_network: "{{ trove_service_net_phys_net }}"
|
|
segmentation_id: "{{ trove_service_net_segmentation_id | default(omit) }}"
|
|
project: "admin"
|
|
subnets:
|
|
- name: "{{ trove_service_subnet_name }}"
|
|
cidr: "{{ trove_service_net_subnet_cidr }}"
|
|
dhcp: "{{ trove_service_net_dhcp }}"
|
|
allocation_start: "{{ trove_service_net_allocation_pool_start | default(omit) }}"
|
|
allocation_end: "{{ trove_service_net_allocation_pool_end | default(omit) }}"
|
|
openstack_resources_network:
|
|
networks: "{{ trove_service_net_setup | ternary(_network_resources, []) }}"
|
|
openstack_resources_image:
|
|
images: "{{ _trove_glance_images_compat }}"
|