Kickstart and module

As you know almalinux 8 introduce with dnf the concept of module
so if you want to install php 7.4 official (without remi repo)
just do
sudo dnf module list php // to list all the php mods available
sudo dnf module reset php // to delete the current default php
sudo dnf module enable php:7.4

the last command switch from php 7.2 to 7.4

now my question how can we do this in kickstart file
without using a post installation script of course
the idea after installation i’m on php 7.4 immédiatly

The question is: where/how are those choices stored?

See at least section 4.3 in https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/pdf/installing_managing_and_removing_user-space_components/red_hat_enterprise_linux-8-installing_managing_and_removing_user-space_components-en-us.pdf

ok but nothing about using module in kickstart files
the only thing that i saw but i don’t like this is to use the postinstallation section of the kickstart

  • To install a module using the specific stream you require to use the dnf command like as follows:

Raw

# dnf install @modulename:stream

For example:

Raw

# dnf install @php:7.4

i will try this tomorow in a kickstart file selectionniong directly the stream in the package section

My bad, misread the question.
Section A.2.2 in https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_an_advanced_rhel_installation/kickstart-script-file-format-reference_installing-rhel-as-an-experienced-user shows this kickstart syntax:

%packages
@module:stream/profile
@php:7.4

For ‘dnf’:

If the <spec> matches both a @<module-spec> and a @<group-spec>, only the module is installed.

For <module-spec> in dnf:

In case stream is not specified, the enabled or the default stream is used, in this order. In case profile is not specified, the system default profile or the ‘default’ profile is used.

In other words, a plain @name in kickstart is probably first matched against modules and then against groups. The installation of php:7.4 in kickstart does most likely enable that stream too.

Thx a lot yes this do the job indeed