On 10/26/14 9:50 AM, Felix Frank wrote:
> Hi,
> 
> the intuitive approach would be:
> 
> class { 'abc': schedule => ... }
> 
> A tentative test seems to indicate that this does in fact not work. If
> this is important to you, you could open a feature request in Jira.
> 
> Thanks,
> Felix
> 
> On 10/01/2014 02:59 PM, Andreas Dvorak wrote:
>> Dear all,
>>
>> I have a class with many resource that should only run at one certain
>> time. I could add a schedule to every resource, but that is the same
>> line at all the resources.
>> Is there a solution to schedule the whole class at one place.
>>
>> something like this
>>
>> include abc {
>>  schedule ....
>> }
>>
>> Best regards,
>> Andreas
>>
> 

You could use resource defaults[1] to achieve this. If your class is
using the schedule metaparameter for a bunch of exec's you could add

Exec {
  schedule => 'my_schedule',
}

schedule { 'my_schedule':
  period => daily,
  range  => '2-4',
}

This would add the schedule parameter with the value 'my_schedule' to
all of the exec{} resources within the class.

[1] - https://docs.puppetlabs.com/puppet/latest/reference/lang_defaults.html

Best regards,
-g


-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/544D9A59.5010308%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to