On Fri, Apr 1, 2011 at 6:34 AM, Robin Lee Powell <
rlpowell@digitalkingdom.org> wrote:
>
> A discussion on IRC about having classes that depend on each other
> sometimes (i.e. a munin class that needs to do mysql-specific things
> on those hosts where mysql is installed) reminded me of a feature
> I''ve wanted for some time in puppet, that I don''t think I
ever
> actually shared/asked about:
>
> I''ve been wanting something like require => that only kicksoff
if
> the required thing is actually defined. So you could do:
>
> file { "munin.d/mysql-config":
> require_if_exists => Package[mysql]
> }
>
you could achieve the same things like this:
file { "munin.d/mysql-config":
...
}
Package<| title == ''mysql'' |> {
before => File[''munin.d/mysql-config'']
}
>
> and if Package[mysql] isn''t set up anywhere, nothing happens.
>
> Does this seem reasonable to people? If so, where should I put it
> in as a feature request?
>
> -Robin
>
> --
> http://singinst.org/ : Our last, best hope for a fantastic future.
> Lojban (http://www.lojban.org/): The language in which "this parrot
> is dead" is "ti poi spitaki cu morsi", but "this
sentence is false"
> is "na nei". My personal page:
http://www.digitalkingdom.org/rlp/
>
> --
> 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+unsubscribe@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-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.