On 02/03/11 04:31, russell.fulton wrote:
> I am having a fight with a postgressql nodule:
>
> It defines:
>
> class postgresql::base {
>
>
>   package {"postgresql":
>     ensure => present,
>     notify => undef,
>   }
> .......
>
> and later we have a class that inherits the base class:
>
> class postgresql::rhe::v8-4 inherits postgresql::base {
>
>   $data_dir = $postgresql_data_dir ? {
>     "" => "/var/lib/postgresql",
>     default => $postgresql_data_dir,
>   }
>
>       package {[
>         "postgresql84",
>         "postgresql84-server",
>         ]:
>         ensure  => present,
>       }
>
> How can I get puppet to ignore the package definition in the 'base'
> class?

A slightly different tactic is to change the name of previously declared
package:

class postgresql::rhe::v8-4 inherits postgresql::base {
    ....
    Package['postgresql'] {
        name => 'postgresql84',
    }
    package { 'postgresql84-server':
        ensure => present,
    }
}

This way if you have any external classes putting a dependency on
Package['postgresql'] they don't get 'broken'.

Dan

> This is on redhat -- postgresql installs 8.1.xxx and I want 8.4 --
> puppet installs the two 84 packages and then bitches that it can not
> install the straight postgresql because of conflicts (quite rightly).
>
> Russell
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@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