openstack-ansible/playbooks/openstack-resources.yml
Dmitriy Rabotyagov ce4f47e184 Use first utility host as default host for openstack_resources
At the moment openstack_service_setup_host is not actually respected as
group_vars defaults provisionment happens during runtime of
the playbook.

With that, openstack_service_setup_host does have the same value
by default for both distro and source installations, which is the
first utility host.

Let's use this value as default since it might fit most of the usecases.

Closes-Bug: #2096939
Change-Id: Id3eb93a3c226185c614e324609bf7be5d789f248
2025-03-20 12:50:52 +01:00

39 lines
1.5 KiB
YAML

---
# Copyright 2023, 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: Create requested OpenStack Resources
hosts: "{{ openstack_service_setup_host | default(groups['utility_all'][0] | default('localhost')) }}"
tasks:
- name: Setup installation variables
include_role:
name: openstack.osa.install_defaults
defaults_from: "{{ install_method }}"
public: true
apply:
tags:
- always
tags:
- always
- name: Include openstack_resources role
ansible.builtin.include_role:
name: openstack.osa.openstack_resources
vars:
openstack_resources_identity: "{{ openstack_user_identity | default({}) }}"
openstack_resources_compute: "{{ openstack_user_compute | default({}) }}"
openstack_resources_network: "{{ openstack_user_network | default({}) }}"
openstack_resources_image: "{{ openstack_user_image | default({}) }}"
openstack_resources_coe: "{{ openstack_user_coe | default({}) }}"