Rafał Radecki
2013-Feb-11 11:00 UTC
[Puppet Users] Puppet 3.1 - remove packages in order/with dependancies.
Hi All. I would like to remove packages in a specified order because they are connected with dependencies. I use: #cat /etc/redhat-release;uname -r CentOS release 6.3 (Final) 2.6.32-279.9.1.el6.centos.plus.x86_64 #rpm -qa | grep -i puppet puppet-3.1.0-1.el6.noarch In my module manifest: class base::dell { .. package { "Lib_Utils": ensure => absent } package { "MegaCli": ensure => absent } .. } Is there a way to ensure that MegaCli will be uninstalled before Lib_Utils and then Lib_Utils will be removed? How can I in puppet language enforce package dependencies in this case? Best regards, Rafal Radecki. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
steve foster
2013-Feb-11 13:52 UTC
[Puppet Users] Re: Puppet 3.1 - remove packages in order/with dependancies.
Hi Rafal, the before meta-parameter would help you here: package{ ''Lib_Utils'': ensure => absent, before => Package[''MegaCli''], } Cheers Steve On Monday, February 11, 2013 11:00:58 AM UTC, Rafał Radecki wrote:> > Hi All. > > I would like to remove packages in a specified order because they are > connected with dependencies. > I use: > #cat /etc/redhat-release;uname -r > CentOS release 6.3 (Final) > 2.6.32-279.9.1.el6.centos.plus.x86_64 > #rpm -qa | grep -i puppet > puppet-3.1.0-1.el6.noarch > > In my module manifest: > class base::dell { > .. > package { "Lib_Utils": ensure => absent } > package { "MegaCli": ensure => absent } > .. > } > Is there a way to ensure that MegaCli will be uninstalled before Lib_Utils > and then Lib_Utils will be removed? How can I in puppet language enforce > package dependencies in this case? > > Best regards, > Rafal Radecki. >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
jcbollinger
2013-Feb-11 14:47 UTC
[Puppet Users] Re: Puppet 3.1 - remove packages in order/with dependancies.
On Monday, February 11, 2013 7:52:23 AM UTC-6, steve foster wrote:> > Hi Rafal, > > the before meta-parameter would help you here: > > package{ ''Lib_Utils'': > ensure => absent, > before => Package[''MegaCli''], > } > >Or you could turn it around and use "require => Package[''Lib_Utils'']" metaparameter on Package[''MegaCli'']. For inter-packages dependencies on a system with a decent package manager (such as CentOS with yum/rpm), however, I would urge you to make sure your packages declare their dependencies correctly, and then just let the package manager handle it. John -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.