Ask Your Question
0

Is there a way to filter portions of a manifest to not be ran during certain hours of the day?

asked 2016-06-30 19:35:19 -0500

Conventional gravatar image

I have multi-part (long and complex) manifests to run against Puppet agents (all Windows servers). I want portions to run against any node in the class as normal. But I want subportions of these same manifests to not run during certain hours of the day. Is there a way to put this conditional logic into the manifest on certain actions? I want to use one manifest and one class of servers. It needs to run every 30 minutes. I just want to filter out portions of the manifests during peak hours.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-07-01 08:10:42 -0500

You could create a custom fact for a timestamp. Then use conditional logic on the timestamp fact. You may need to separate the code to be conditionally run into a separate file and include, though it may work in a single manifest.

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

Stats

Asked: 2016-06-30 19:35:19 -0500

Seen: 46 times

Last updated: Jul 01 '16