Ask Your Question

Is is possible to call a resource from another class

asked 2016-04-05 08:07:19 -0600

amckay gravatar image

I would like to centralise certain aspects of our puppet infrastructure particularly for service restarts when configurations have been applied and for schedules.

For example I would like one master schedule class as below:

class {'schedules':

schedule{'night-time': # }

schedule{'day-time': # } }

The be able to call individual resource from other modules as below:

class {'other-class':

file{'i require a schedule': schedule => ['night-time'], } }

Is this possible?

Many Thanks Andy

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-04-05 19:13:38 -0600

lavaman gravatar image

It should work fine. If you have parse errors saying it doesn't know about that schedule, just require schedules in other-class.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-04-05 08:07:19 -0600

Seen: 31 times

Last updated: Apr 05 '16