Add openstack-resources playbook

This aims to add a user-facing interface to interact with
openstack_resources role.

Change-Id: I1c2688f469cfaef02e6e925fa7a99573f61efbd6
This commit is contained in:
Dmitriy Rabotyagov 2023-11-20 14:54:01 +01:00
parent 2e93f05e09
commit 0c1c9a8485
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,29 @@
---
# 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('localhost') }}"
vars_files:
- "defaults/{{ install_method | default('source') }}_install.yml"
tasks:
- 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({}) }}"

View File

@ -0,0 +1,18 @@
---
features:
- |
Added ``openstack-resources.yml`` playbook that aims to handle creation
and futher adjustment of OpenStack resources. It relies heavily on
Ansible collection for OpenStack. The main goal of the playbook to provide
a unified method of creating and managing common resources, like images,
flavors, compute aggregates, networks, etc.
Playbook can consume following variables, that are provided to simmilar
ones in ``openstack.osa.openstack_resources`` role:
* openstack_user_identity
* openstack_user_compute
* openstack_user_network
* openstack_user_image
* openstack_user_coe
Please reffer to the role documentation and examples for more details.