package { "MySQL-client-community" : ensure => installed, require =>
Package[ "mysql" ] }will just work, as you are requiring the the mysql package is already absent before you install the other package. Ohad On Tue, May 18, 2010 at 12:35 PM, Tim Nicholas <[email protected]> wrote: > Hello everyone, > > > I'm just getting to grips with Puppet so apologies if I've missed > something. > > I'm wondering if there is a way to require that something isn't the case. > > My current situation/example is that I'm trying to uninstall one > package ("mysql") and install another one that conflicts with it > ("MySQL-client-community") in one puppet run. > > I can do something like: > > package { [ "mysql" ] : ensure => absent, } > package { [ "MySQL-client-community", ] : ensure => installed, } > > Which is fine, unless "MySQL-client-community" is scheduled to be > installed before mysql is removed, in which case it errors and I'm > left with a system with no mysql. > > Obviously, I can just run puppet again and it'll be fine but I'd > really like to do something like: > > package { [ "MySQL-client-community", ] : ensure => installed, > require => ! Package[ "mysql" ] } > > with the ! negating the requirement. > > Is this possible or am I approaching this from the wrong angle and I > should be doing something quite different? > > > Thanks, > Tim > > -- > Tim Nicholas > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<puppet-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
