Execution
Date 08 Dec 2025 13:39:52 +0000
Duration 00:35:02.03
Controller aio1.openstack.local
User root
Versions
Ansible 2.18.6
ara 1.7.4 / 1.7.4
Python 3.12.3
Summary
2 Hosts
1377 Tasks
1365 Results
104 Plays
504 Files
0 Records

File: /etc/ansible/ansible_collections/openstack/osa/roles/openstack_resources/tasks/compute.yml

---
# 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: Ensure host aggregate exists in nova
  openstack.cloud.host_aggregate:
    cloud: "{{ openstack_resources_cloud_name }}"
    interface: "{{ openstack_resources_interface }}"
    name: "{{ aggregate.name }}"
    metadata: "{{ aggregate.metadata | default(omit) }}"
    availability_zone: "{{ aggregate.availability_zone | default(omit) }}"
    hosts: "{{ aggregate.hosts | default(omit) }}"
    purge_hosts: "{{ aggregate.exclusive | default(omit) }}"
    state: "{{ aggregate.state | default('present') }}"
  loop: "{{ openstack_resources_compute['aggregates'] | default([]) }}"
  loop_control:
    loop_var: aggregate
  vars:
    ansible_python_interpreter: "{{ openstack_resources_python_interpreter }}"

- name: Iterating over set of required flavors
  ansible.builtin.include_tasks:
    file: compute_flavors.yml
  loop: "{{ openstack_resources_compute['flavors'] | default([]) }}"
  loop_control:
    loop_var: flavor
  vars:
    ansible_python_interpreter: "{{ openstack_resources_python_interpreter }}"

- name: Create and upload keypairs
  ansible.builtin.include_tasks:
    file: keypairs.yml
    apply:
      tags:
        - compute-keypairs
  loop: "{{ openstack_resources_compute['keypairs'] | default([]) }}"
  loop_control:
    loop_var: keypair
  tags:
    - compute-keypairs