Skip to content

Commit

Permalink
aii-ks: define versionlock plugin name into KS variant
Browse files Browse the repository at this point in the history
  • Loading branch information
jouvin committed Nov 12, 2024
1 parent d4f7809 commit e98f5eb
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 33 deletions.
63 changes: 30 additions & 33 deletions aii-ks/src/main/pan/quattor/aii/ks/config.pan
Original file line number Diff line number Diff line change
Expand Up @@ -351,16 +351,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",
Expand Down Expand Up @@ -445,34 +470,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
Expand Down
2 changes: 2 additions & 0 deletions aii-ks/src/main/pan/quattor/aii/ks/variants/el8.pan
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions aii-ks/src/main/pan/quattor/aii/ks/variants/el9.pan
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e98f5eb

Please sign in to comment.