I was thinking about a conceptual thing and I will try to explain with a
concrete example.

In the puppetlabs-lvm module
there is code like this in the logical_volume provider

if mount( '-f', '--guess-fstype', path) =~ /ext[34]/
resize2fs( path) || ...

The resize2fs command is in the e2fsprogs package (well it is more
complicated, but this is another topic), so this package has to be
installed or an error will thrown.

I was thinking about how to ensure that the package is installed.
I realize that I could do just

package { 'e2fsprogs': }
logical_volume { 'bla':
fs_type => 'ext3',
require => Package['e2fsprogs']

Is it possible to hide this dependency in the custom type?
Is it possible to include another class from within a custom type? After
the other class is included autorequire could do its job. I think it is
some kind of autoinclude that I am after.
Kind Regards, Markus Falb

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
grouppuppet-users @
postedMay 20, '12 at 11:18a
activeMay 21, '12 at 4:26p



site design / logo © 2022 Grokbase