Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions ansible/action_plugins/template_content.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (c) 2025 StackHPC Ltd.
#
# 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.

__metaclass__ = type

import kayobe.plugins.action.template_content

ActionModule = kayobe.plugins.action.template_content.ActionModule
12 changes: 6 additions & 6 deletions ansible/baremetal-compute-introspection-data-save.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
virtualenv: "{{ venv }}"
name:
- python-openstackclient
- python-ironic-inspector-client
- python-ironicclient
state: latest
virtualenv_command: python3.{{ ansible_facts.python.version.minor }} -m venv
extra_args: "{% if pip_upper_constraints_file %}-c {{ pip_upper_constraints_file }}{% endif %}"
Expand All @@ -31,7 +31,7 @@
tasks:
- name: Query baremetal compute nodes' hardware introspection data
command: >
{{ venv }}/bin/openstack baremetal introspection data save {{ inventory_hostname }}
{{ venv }}/bin/openstack baremetal node inventory save {{ inventory_hostname }}
register: save_result
changed_when: False
# Ignore errors, log a message later.
Expand All @@ -44,14 +44,14 @@
ansible_host: "{{ hostvars[controller_host].ansible_host | default(controller_host) }}"

- name: Ensure introspection data output directory exists
local_action:
module: file
delegate_to: localhost
file:
path: "{{ output_dir }}"
state: directory

- name: Ensure introspection data is saved locally
local_action:
module: copy
delegate_to: localhost
copy:
content: "{{ introspection_data_map[output_format | lower] }}"
dest: "{{ output_dir }}/{{ inventory_hostname }}.{{ output_format | lower }}"
when: save_result.rc == 0
Expand Down
2 changes: 1 addition & 1 deletion ansible/docker-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
- docker-registry
roles:
- role: docker-registry
docker_registry_action: "{{ kayobe_action }}"
docker_registry_action: "{{ kayobe_action | default('deploy') }}"
docker_registry_config_path: "{{ config_path }}/docker-registry"
8 changes: 4 additions & 4 deletions ansible/drac-facts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
- role: stackhpc.drac-facts
tasks:
- name: Gather facts via DRAC
local_action:
module: drac_facts
delegate_to: localhost
drac_facts:
address: "{{ ipmi_address }}"
username: "{{ ipmi_username }}"
password: "{{ ipmi_password }}"
Expand All @@ -23,7 +23,7 @@
var: result

- name: Write facts to a file
local_action:
module: copy
delegate_to: localhost
copy:
content: "{{ result }}"
dest: "/tmp/drac-facts-{{ inventory_hostname }}.json"
16 changes: 8 additions & 8 deletions ansible/dump-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@
dump_hosts: all
tasks:
- name: Create configuration dump directory
local_action:
module: file
delegate_to: localhost
file:
path: "{{ dump_path }}"
state: directory

- name: Write host config to file
local_action:
module: copy
delegate_to: localhost
copy:
content: "{{ hostvars[inventory_hostname] | to_nice_yaml }}"
dest: "{{ dump_path }}/{{ inventory_hostname }}.yml"
when: dump_var_name is not defined

- name: Write host variable to file
local_action:
module: copy
delegate_to: localhost
copy:
content: "{{ hostvars[inventory_hostname][dump_var_name] | to_nice_yaml }}"
dest: "{{ dump_path }}/{{ inventory_hostname }}.yml"
when: dump_var_name is defined

# - name: Write merged config to file
# local_action:
# module: copy
# delegate_to: localhost
# copy:
# content: "{{ hostvars | merge_config | to_nice_yaml }}"
# dest: "{{ dump_path }}/merged.yml
4 changes: 2 additions & 2 deletions ansible/inventory/group_vars/all/bifrost
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ kolla_bifrost_extra_kernel_options: []
###############################################################################
# Ironic Inspector configuration.

# List of of inspector processing plugins.
kolla_bifrost_inspector_processing_hooks: "{{ inspector_processing_hooks }}"
# List of of inspector plugins.
kolla_bifrost_inspector_hooks: "{{ inspector_hooks }}"

# Which MAC addresses to add as ports during introspection. One of 'all',
# 'active' or 'pxe'.
Expand Down
11 changes: 5 additions & 6 deletions ansible/inventory/group_vars/all/globals
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ kayobe_ansible_user: "stack"
# is "rocky".
os_distribution: "rocky"

# OS release. Valid options are "9-stream" and "10-stream" (with "9-stream"
# being the default) when os_distribution is "centos", "9" and "10" (with "9"
# being the default) when os_distribution is "rocky", or "noble" when
# os_distribution is "ubuntu".
# OS release. Valid options are "10-stream" when os_distribution is "centos",
# "10" when os_distribution is "rocky", or "noble" when os_distribution is
# "ubuntu".
os_release: >-
{{ '9-stream' if os_distribution == 'centos'
else '9' if os_distribution == 'rocky'
{{ '10-stream' if os_distribution == 'centos'
else '10' if os_distribution == 'rocky'
else 'noble' }}

###############################################################################
Expand Down
14 changes: 1 addition & 13 deletions ansible/inventory/group_vars/all/infra-vms
Original file line number Diff line number Diff line change
Expand Up @@ -43,30 +43,18 @@ infra_vm_root_format: qcow2
# Base image for the infra VM root volume. Default is
# "https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img"
# when os_distribution is "ubuntu",
# "https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2"
# when os_distribution is "rocky" and os_release is "9",
# "https://dl.rockylinux.org/pub/rocky/10/images/x86_64/Rocky-10-GenericCloud-Base.latest.x86_64.qcow2"
# when os_distribution is "rocky" and os_release is "10",
# "https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-x86_64-9-latest.x86_64.qcow2"
# when os_distribution is "centos" and os_release is "9-stream", or
# when os_distribution is "rocky", or
# "https://cloud.centos.org/centos/10-stream/x86_64/images/CentOS-Stream-GenericCloud-x86_64-10-latest.x86_64.qcow2"
# otherwise.
infra_vm_root_image: >-
{%- if os_distribution == 'ubuntu' %}
https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img
{%- elif os_distribution == 'rocky' %}
{%- if os_release == '9' %}
https://dl.rockylinux.org/pub/rocky/9/images/x86_64/Rocky-9-GenericCloud.latest.x86_64.qcow2
{%- else -%}
https://dl.rockylinux.org/pub/rocky/10/images/x86_64/Rocky-10-GenericCloud-Base.latest.x86_64.qcow2
{%- endif %}
{%- else -%}
{%- if os_release == '9-stream' %}
https://cloud.centos.org/centos/9-stream/x86_64/images/CentOS-Stream-GenericCloud-x86_64-9-latest.x86_64.qcow2
{%- else -%}
https://cloud.centos.org/centos/10-stream/x86_64/images/CentOS-Stream-GenericCloud-x86_64-10-latest.x86_64.qcow2
{%- endif %}
{%- endif %}

# Capacity of the infra VM data volume.
infra_vm_data_capacity: 100G
Expand Down
Loading
Loading