On Monday, September 28, 2015 at 10:17:31 PM UTC-5, Tom Downes wrote:
>
> I have a defined resource that I instantiate through create_resources and 
> a set of defaults that trace back to hiera:
>
> create_resources("apache::vhost", $full_apache_hash, $http_defaults)
>
>
> http_defaults:
>
>   schedule: 'nightly'
>
>   priority: '25'
>
>   docroot: '/var/www'
>
>   serveradmin: 'myl...@dot.edu <javascript:>'
>
>   port: '80'
>
>
> Elsewhere in the catalog I have defined:
>
>
> schedule { 'nightly':
>
>   range  => '0-2',
>
>   period => daily,
>
>   repeat => 1,
>
> }
>
>
> When I run "puppet agent -t" outside of the specified range, it always 
> takes action to manage my apache::vhost. i.e. if I blow away the file, it 
> will come back. Am I wrong not to expect this? Is it create_resources not 
> honoring schedule or puppet agent -t ignoring schedule?
>
>
>

There have been problems with create_resources() and other metaparameters 
in the past, but I think the consensus is that they *should* work 
together.  I see no reason or documentation that the 'schedule' 
metaparameter would be different.

Looking at the other side of the equation, there is a configuration setting 
'ignoreschedules' whose effect on the agent is what its name indicates.  
That setting is not documented to be included in '--test' / '-t', but 
perhaps it crept in there without being documented, or perhaps it is 
specified in your config file.  I'd try this command instead to see whether 
it behaves differently with respect to schedules:

puppet agent --onetime --no-daemonize --ignorecache --no-usecacheonfailure 
--no-ignoreschedules

Optionally, include also some or all of the flags --detailed-exitcodes 
--no-splay --show_diff', which are implied by --test.

If the schedule still is not honored then do make sure it is actually in 
the catalog the agent retrieves.  If so, then I call bug.


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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/f3f58aba-64bf-4286-a78d-28c9f16e2a52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to