On May 17, 2010, at 9:35 PM, Tim Nicholas wrote:
> 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?
You've almost got it. I'll work find if you remove the "!". That will require
resource not the package itself and the resource says to remove the package.
--
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.