Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What is the best practise to purge a installed package?

I'm in the process securing a HP server running OracleLinux 6.5 (compatible with Redhat/Centos 6.5). On the host I run puppet-server/client version 3.7.

What is the best practice to remove an installed package?

In the quest with my objective I purge a number of packages in my site.pp manifest like so:

class { hp_remove_rpms : rpms => [ "nfs-utils", "rpcbind", "cups" ] }

This class, hp_remove_rpms is very simple:

class hp_remove_rpms ( $rpms ='' ) {
    package { $rpms :
               ensure => purged,
        allow_virtual => true,
    }
}

Although this works, but when the client runs a second time (in verbose mode):

/usr/bin/puppet agent --no-daemonize --verbose --onetime

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for ol65.home.tld
Info: Applying configuration version '1412450275'
Notice: /Stage[main]/Hp_remove_rpms/Package[nfs-utils]/ensure: created
Notice: /Stage[main]/Hp_remove_rpms/Package[cups]/ensure: created
Notice: /Stage[main]/Hp_remove_rpms/Package[rpcbind]/ensure: created
Notice: Finished catalog run in 11.02 seconds

This does look like puppet is doing some unnecessary processing. Despite that the actual puppet run say created nothing is really created.

Thanks for any input. /Bertil

What is the best practise to purge a an installed package?

I'm in the process securing a HP server running OracleLinux 6.5 (compatible with Redhat/Centos 6.5). On the host I run puppet-server/client version 3.7.

What is the best practice to remove an installed package?

In the quest with my objective I purge a number of packages in my site.pp manifest like so:

class { hp_remove_rpms : rpms => [ "nfs-utils", "rpcbind", "cups" ] }

This class, hp_remove_rpms is very simple:

class hp_remove_rpms ( $rpms ='' ) {
    package { $rpms :
               ensure => purged,
        allow_virtual => true,
    }
}

Although this works, but when the client runs a second time (in verbose mode):

/usr/bin/puppet agent --no-daemonize --verbose --onetime

Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for ol65.home.tld
Info: Applying configuration version '1412450275'
Notice: /Stage[main]/Hp_remove_rpms/Package[nfs-utils]/ensure: created
Notice: /Stage[main]/Hp_remove_rpms/Package[cups]/ensure: created
Notice: /Stage[main]/Hp_remove_rpms/Package[rpcbind]/ensure: created
Notice: Finished catalog run in 11.02 seconds

This does look like puppet is doing some unnecessary processing. Despite that the actual puppet run say created nothing is really created.

Thanks for any input. /Bertil