Ah. Thanks everyone. I new I'd misunderstood something.


On 18 May 2010 16:49, Ohad Levy <ohadl...@gmail.com> wrote:
> 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 <t...@nicholas.net.nz> 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 puppet-us...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> puppet-users+unsubscr...@googlegroups.com.
>> 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 puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>



-- 
Tim Nicholas
Cell/SMS: +64 21 337 204

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to