How to define class inheritance with Puppet Ruby DSL

592 Views Asked by At

I have a Puppet class "Ruby":

# init.pp
class ruby {
  package { 'libldap-ruby1.8':
    ensure => 'installed'
  }
}

Then I have a class written in Puppet Ruby DSL, which should inherit this Puppet-class:

# ldap.rb
hostclass 'ruby::ldap' do
  (...)
end

How do I define that ruby::ldap inherits ruby?

2

There are 2 best solutions below

2
On

Unfortunately, the Puppet developers on Google Groups do not answer any related questions (link1, link2).

2
On

Update, the existing ruby-dsl is deprecated. There exists plans to release a new version that's not backwards compatible. I don't think the older ruby-dsl ever supported inheritance.

If you like the flexibility provided by the puppet ruby-dsl you may enjoy chef as well.