On Tue, Sep 14, 2010 at 2:36 PM, Douglas Garstang
<doug.garst...@gmail.com> wrote:
> On Tue, Sep 14, 2010 at 1:12 PM, Marc Zampetti <marc.zampe...@gmail.com> 
> wrote:
>>  I've been banging my head on this all day, and I cannot seem to figure out
>> how to do it.
>>
>> I have a package for Apache HTTPd. I want to be able to specify the exact
>> version of the package to use for a particular installation. And it is also
>> possible that I want to have two separate modules install the same package.
>>
>> So, what I end up with is the following
>>
>> class app-apache {
>>  package { "apache" : ensure => installed, noop => true }
>> }
>>
>> class app-apache-server1 inherits app-apache {
>>   Package["apache"] {ensure => "2.2.15", noop => false}
>> }
>>
>> class app-apache-server2 inherits app-apache {
>>   Package["apache"] {ensure => "2.2.15", noop => false}
>> }
>>
>> Basically, I have two servers configured. Now, it is possible that both
>> servers could end up on the same host, depending upon a number of facters.
>> When that happens, I get an error about not being able to override the
>> "ensure" method in app-apache-server2 because it was already overridden in
>> app-apache-server1.
>>
>> Anyone have any ideas on how to do this? I need to be able to specify the
>> version I want for a particular class, and that can change from class to
>> class. I realize that if two different classes define two different versions
>> and both classes end up on the same node, I will get errors from YUM. I'm ok
>> with that.
>>
>> Marc Zampetti
>
> Marc,
>
> We're doing what your trying to. We'd be screwed without the ability
> to specify a package version. We do:
>
> package foo {
>    ensure => "1.21-10-1"
> }
>
> Works fine...
>
> Doug.
>

Sorry... really bad example. Lets do it right this time...

package {
  "foo":
    ensure => "1.21.10-1";
}

Doug

-- 
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