From 0c1c9a848560dbee72ede8292c8798d428876292 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 20 Nov 2023 14:54:01 +0100 Subject: [PATCH] Add openstack-resources playbook This aims to add a user-facing interface to interact with openstack_resources role. Change-Id: I1c2688f469cfaef02e6e925fa7a99573f61efbd6 --- playbooks/openstack-resources.yml | 29 +++++++++++++++++++ ...k_resources_playbook-fc76d89779e6c275.yaml | 18 ++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 playbooks/openstack-resources.yml create mode 100644 releasenotes/notes/openstack_resources_playbook-fc76d89779e6c275.yaml diff --git a/playbooks/openstack-resources.yml b/playbooks/openstack-resources.yml new file mode 100644 index 0000000000..288fab3406 --- /dev/null +++ b/playbooks/openstack-resources.yml @@ -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({}) }}" diff --git a/releasenotes/notes/openstack_resources_playbook-fc76d89779e6c275.yaml b/releasenotes/notes/openstack_resources_playbook-fc76d89779e6c275.yaml new file mode 100644 index 0000000000..349e4a3fb4 --- /dev/null +++ b/releasenotes/notes/openstack_resources_playbook-fc76d89779e6c275.yaml @@ -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.