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

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:


# dnf install @modulename:stream

For example:


# 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 Appendix A. Kickstart script file format reference Red Hat Enterprise Linux 8 | Red Hat Customer Portal shows this kickstart syntax:


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