In order

20 views
Skip to first unread message

Albert Shih

unread,
Oct 22, 2015, 11:03:23 AM10/22/15
to puppet...@googlegroups.com
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


Regards.

JAS


--
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
jeu 22 oct 2015 16:56:50 CEST

jcbollinger

unread,
Oct 23, 2015, 9:03:32 AM10/23/15
to Puppet Users, Alber...@obspm.fr


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

Reply all
Reply to author
Forward
0 new messages