From 954d5c997cf8e8ef00aba1480ea302ffdfade2d4 Mon Sep 17 00:00:00 2001 From: Adam Ruzicka Date: Tue, 3 Dec 2024 13:36:09 +0100 Subject: [PATCH] Make centos medium name configurable --- roles/foreman_provisioning/defaults/main.yml | 1 + roles/foreman_provisioning/tasks/configure_centos_9.yml | 2 +- roles/foreman_provisioning/tasks/main.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/foreman_provisioning/defaults/main.yml b/roles/foreman_provisioning/defaults/main.yml index 88428bed8..1f922c293 100644 --- a/roles/foreman_provisioning/defaults/main.yml +++ b/roles/foreman_provisioning/defaults/main.yml @@ -12,3 +12,4 @@ foreman_provisioning_network: 192.168.73.0 foreman_provisioning_installer_options: [] foreman_provisioning_domain: example.com foreman_provisioning_foreman_version: "{{ foreman_repositories_version | default('nightly') }}" +foreman_provisioning_centos_medium_name: "CentOS Stream 9 mirror" diff --git a/roles/foreman_provisioning/tasks/configure_centos_9.yml b/roles/foreman_provisioning/tasks/configure_centos_9.yml index adfac4856..e444e2411 100644 --- a/roles/foreman_provisioning/tasks/configure_centos_9.yml +++ b/roles/foreman_provisioning/tasks/configure_centos_9.yml @@ -12,7 +12,7 @@ architectures: - x86_64 media: - - CentOS Stream 9 mirror + - "{{ foreman_provisioning_centos_medium_name }}" provisioning_templates: "{{ result.resources | map(attribute='name') }}" ptables: - Kickstart default diff --git a/roles/foreman_provisioning/tasks/main.yml b/roles/foreman_provisioning/tasks/main.yml index da1904dca..530ff3c1c 100644 --- a/roles/foreman_provisioning/tasks/main.yml +++ b/roles/foreman_provisioning/tasks/main.yml @@ -61,7 +61,7 @@ {{ foreman_provisioning_hammer }} hostgroup create --name 'CentOS 9 Mirror' --operatingsystem 'CentOS_Stream 9' - --medium 'CentOS Stream 9 mirror' + --medium '{{ foreman_provisioning_centos_medium_name }}' --partition-table 'Kickstart default' --parent 'Base' {{ foreman_provisioning_hammer_taxonomy_params }}