From 1d080a13a553dacb00689b5086166b78c02c936d Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Thu, 17 Jul 2025 12:45:39 +0200 Subject: [PATCH] Implement post openstack_hosts playbook There are usecases, where deployer might want to have a hook after openstack_hosts are configured in terms of networks, mounts and etc, but before LXC containers are spawned. Change-Id: Iac71e4b29af1c8bfe9d350b3b117cf7de7de6451 Signed-off-by: Dmitriy Rabotyagov --- playbooks/setup_hosts.yml | 3 +++ .../notes/post_metal_hook-745944b8121bbc64.yaml | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 releasenotes/notes/post_metal_hook-745944b8121bbc64.yaml diff --git a/playbooks/setup_hosts.yml b/playbooks/setup_hosts.yml index f7e3566d..8d04fb0a 100644 --- a/playbooks/setup_hosts.yml +++ b/playbooks/setup_hosts.yml @@ -28,6 +28,9 @@ - name: Importing openstack_hosts_setup playbook ansible.builtin.import_playbook: openstack.osa.openstack_hosts_setup +- name: Importing post metal configuration playbook + ansible.builtin.import_playbook: "{{ post_metal_configuration_hook | default('openstack.osa.hook_dummy') }}" + - name: Importing containers_deploy playbook ansible.builtin.import_playbook: openstack.osa.containers_deploy diff --git a/releasenotes/notes/post_metal_hook-745944b8121bbc64.yaml b/releasenotes/notes/post_metal_hook-745944b8121bbc64.yaml new file mode 100644 index 00000000..8eef5c44 --- /dev/null +++ b/releasenotes/notes/post_metal_hook-745944b8121bbc64.yaml @@ -0,0 +1,10 @@ +--- +features: + - | + A variable ``post_metal_configuration_hook`` is introduced, which can + be used to define a hookable playbook which will execute right after + configuration of metal host in perfromed inside of ``openstack_hosts`` + role. + This might be a handy for downstream customizations to happen, as + networkd, mounts, services and kernel modules are already configured + at this point, but LXC containers are not yet created.