Using dnf/yum Modular Filtering with pkg.installed

13 views
Skip to first unread message

Gregor Rothner

unread,
Apr 11, 2022, 11:24:46 AM4/11/22
to Salt-users

Hi there.
Is there any way of installing packages with pkg.installed which are filtered out by dnf modular filtering? Like installing a normal package and don't have to worry about any modules.
So far I found 2 ways which aren't working perfectly for me.
  1.  Enable module with cmd.run before pkg.install 
    • Works but isn't very maintenance friendly
  2. Prefix package name with @ and put single quotation marks around it
    • install_mysql_pkg:
        pkg.installed:
          - name: '@nginx:1.20/common'
    • Although by running this state all the needed packages are installed, the state result is false because it cannot find the Package: '@nginx:1.20/common'
So far im not a very huge fan of all that filtering stuff.

Do you have any tips on how to solve this more easily?

Thanks
Greg


Reply all
Reply to author
Forward
0 new messages