On Thursday, October 22, 2015 at 10:03:23 AM UTC-5, Albert Shih wrote:
>
> Hi,
>
> I would like to known how can I make something like
>
> file{ }
> -> include ::other_module
>
> (file can be any puppet ressource) other than put some require inside the
> ::other_module
>
>
You could do this:
include '::other_module'
my_resource { 'foo':
# ...
before => Class['::other_module']
}
or this:
include '::other_module'
my_resource { 'foo':
# ...
}
My_resource['foo'] -> Class['::other_module']
or even this:
include '::other_module'
my_resource { 'foo':
# ...
}
->
Class['::other_module']
I guess the key point is that you can create a reference to a class using
resource reference syntax, and use it in pretty much all the ways you can
use an ordinary resource reference.
John
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/74b94c5b-e9f9-4e72-a3a4-8ef70d48e69f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.