Issue with package provider dnfmodule

561 views
Skip to first unread message

Christian Masopust

unread,
Jul 23, 2021, 1:26:47 AM7/23/21
to puppet...@googlegroups.com

Hi guys,

 

I’m using dnfmodule provider to enable a module on my CentOS 8 systems:

 

ensure_packages( ['redis:6'], { provider => dnfmodule, ensure => present, enable_only => true } )

 

I would expect that this enables the module at first run and then it leaves it untouched, but what I see at any run is
that it will be „updated“ each time:

 

Notice: /Stage[main]/Gt_redis/Package[redis:6]/ensure: created (corrective)

 

Debug output of the  puppet run:

 

Info: /Package[redis:6]: Starting to evaluate the resource (275 of 506)

Debug: Executing: '/usr/bin/dnf module list -d 0 -e 1'

Debug: Executing: '/usr/bin/dnf module enable -d 0 -e 1 -y redis:6'

Notice: /Stage[main]/Gt_redis/Package[redis:6]/ensure: created (corrective)

Debug: /Package[redis:6]: The container Class[Gt_redis] will propagate my refresh event

Info: /Package[redis:6]: Evaluated in 7.61 seconds

 

 

So, is this an issue in puppet? Or is my resource configuration wrong?

 

Thanks,

Christian

Luchian Nemes

unread,
Jul 23, 2021, 9:35:15 AM7/23/21
to puppet...@googlegroups.com
Hi Christian,

The following manifests should achieve your goal:

package { 'redis':
  ensure   => '6',
  provider => 'dnfmodule',
  enable_only => true
}

or

ensure_packages( [‘redis’], { provider => dnfmodule, ensure => '6', enable_only => true } )

We've managed to reproduce your issue and sadly Puppet does not support stream in package name. The version should be provided in the ensure field as stated here. I hope this helps.

Luchi

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/000201d77f83%244eb1afb0%24ec150f10%24%40chello.at.
Reply all
Reply to author
Forward
0 new messages