From ded2779805418d7ffc2d965305cd344c7cf90dc7 Mon Sep 17 00:00:00 2001 From: Michel Jouvin Date: Mon, 11 Nov 2024 19:56:29 +0100 Subject: [PATCH] aii-ks: define versionlock plugin name into KS variant --- aii-ks/src/main/pan/quattor/aii/ks/config.pan | 63 +++++++++---------- .../main/pan/quattor/aii/ks/variants/el8.pan | 2 + .../main/pan/quattor/aii/ks/variants/el9.pan | 2 + 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/aii-ks/src/main/pan/quattor/aii/ks/config.pan b/aii-ks/src/main/pan/quattor/aii/ks/config.pan index 2b197076..f423fcfb 100644 --- a/aii-ks/src/main/pan/quattor/aii/ks/config.pan +++ b/aii-ks/src/main/pan/quattor/aii/ks/config.pan @@ -349,16 +349,41 @@ variable AII_OSINSTALL_OPTION_FIREWALL ?= null; "firewall" ?= AII_OSINSTALL_OPTION_FIREWALL; +# Include OS specific kickstart configuration, if needed +# - including this at the end allow to undefine tree elements, and remain compatible with other (previous) OSes +# - allow 2 types of variants : major and minor OS variants. Variants for major OS version are located in the standard configuration +# (as defined by AII_KS_OS_MAJOR_SPECIFIC_INCLUDE, default value should be appropriate when using QWG templates). Variants for minor +# OS versions are located into the related OS templates ((as defined by AII_KS_OS_MINOR_SPECIFIC_INCLUDE, default value should be appropriate when using QWG +# templates). When both exist, they are both applied. +variable AII_KS_OS_MAJOR_SPECIFIC_INCLUDE ?= + if ( is_defined(OS_VERSION_PARAMS['major']) ) { + if_exists('quattor/aii/ks/variants/' + OS_VERSION_PARAMS['major']); + } else { + undef; + }; +include { + debug('KS specific configuration for OS major version: ' + to_string(AII_KS_OS_MAJOR_SPECIFIC_INCLUDE)); + AII_KS_OS_MAJOR_SPECIFIC_INCLUDE; +}; +# Existence of OS_VERSION_PARAMS['minor'] is used as a QWG signature +variable AII_KS_OS_MINOR_SPECIFIC_INCLUDE ?= + if ( is_defined(OS_VERSION_PARAMS['minor']) ) { + if_exists('config/quattor/ks'); + } else { + undef; +}; +include { + debug('KS specific configuration for OS minor release: ' + to_string(AII_KS_OS_MINOR_SPECIFIC_INCLUDE)); + AII_KS_OS_MINOR_SPECIFIC_INCLUDE; +}; + + # # Minimal package sets to install # default list of packages required for the initial installation # -variable AII_OSINSTALL_VERSIONLOCK_PLUGIN = if ( OS_VERSION_PARAMS['majorversion'] >= '8' ) { - "python3-dnf-plugin-versionlock"; -} else { - "yum-plugin-versionlock"; -}; +final variable AII_OSINSTALL_VERSIONLOCK_PLUGIN ?= 'yum-plugin-versionlock'; variable AII_OSINSTALL_PACKAGES ?= list( "curl", "lsof", @@ -443,34 +468,6 @@ variable AII_OSINSTALL_NODEPROFILE ?= }; "node_profile" ?= AII_OSINSTALL_NODEPROFILE; -# Include OS specific kickstart configuration, if needed -# - including this at the end allow to undefine tree elements, and remain compatible with other (previous) OSes -# - allow 2 types of variants : major and minor OS variants. Variants for major OS version are located in the standard configuration -# (as defined by AII_KS_OS_MAJOR_SPECIFIC_INCLUDE, default value should be appropriate when using QWG templates). Variants for minor -# OS versions are located into the related OS templates ((as defined by AII_KS_OS_MINOR_SPECIFIC_INCLUDE, default value should be appropriate when using QWG -# templates). When both exist, they are both applied. -variable AII_KS_OS_MAJOR_SPECIFIC_INCLUDE ?= - if ( is_defined(OS_VERSION_PARAMS['major']) ) { - if_exists('quattor/aii/ks/variants/' + OS_VERSION_PARAMS['major']); - } else { - undef; - }; -include { - debug('KS specific configuration for OS major version: ' + to_string(AII_KS_OS_MAJOR_SPECIFIC_INCLUDE)); - AII_KS_OS_MAJOR_SPECIFIC_INCLUDE; -}; -# Existence of OS_VERSION_PARAMS['minor'] is used a a QWG signature -variable AII_KS_OS_MINOR_SPECIFIC_INCLUDE ?= - if ( is_defined(OS_VERSION_PARAMS['minor']) ) { - if_exists('config/quattor/ks'); - } else { - undef; -}; -include { - debug('KS specific configuration for OS minor release: ' + to_string(AII_KS_OS_MINOR_SPECIFIC_INCLUDE)); - AII_KS_OS_MINOR_SPECIFIC_INCLUDE; -}; - # # For more details on Kickstart options see RedHat documentation: # http://www.redhat.com/docs/manuals/enterprise/RHEL-3-Manual/sysadmin-guide/ch-kickstart2.html diff --git a/aii-ks/src/main/pan/quattor/aii/ks/variants/el8.pan b/aii-ks/src/main/pan/quattor/aii/ks/variants/el8.pan index d7796080..f41a85f3 100644 --- a/aii-ks/src/main/pan/quattor/aii/ks/variants/el8.pan +++ b/aii-ks/src/main/pan/quattor/aii/ks/variants/el8.pan @@ -2,6 +2,8 @@ template quattor/aii/ks/variants/el8; +variable AII_OSINSTALL_VERSIONLOCK_PLUGIN ?= 'python3-dnf-plugin-versionlock'; + # Remove deprecated options prefix "/system/aii/osinstall/ks"; "mouse" = null; diff --git a/aii-ks/src/main/pan/quattor/aii/ks/variants/el9.pan b/aii-ks/src/main/pan/quattor/aii/ks/variants/el9.pan index 6e33ac22..d3da38f6 100644 --- a/aii-ks/src/main/pan/quattor/aii/ks/variants/el9.pan +++ b/aii-ks/src/main/pan/quattor/aii/ks/variants/el9.pan @@ -2,6 +2,8 @@ template quattor/aii/ks/variants/el9; +variable AII_OSINSTALL_VERSIONLOCK_PLUGIN ?= 'python3-dnf-plugin-versionlock'; + # Remove deprecated options prefix "/system/aii/osinstall/ks"; "mouse" = null;