Ask Your Question

Puppet agent run customization - Nexus

asked 2016-05-10 10:09:17 -0600

Puppet agent runs for every 30 minutes, I want puppet agent to run only if there are updates by looking in to Nexus repositories.

I do not want Puppet agent to trigger every 30 minutes even if there are no updates. Only by checking Nexus is there a way to customize a run.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-05-11 10:55:44 -0600

is puppet only being used to install output from nexus? not sure why you wouldnt want puppet to run every x minutes (ok I get there would be some edge cases where thats needed) ..if puppet doesnt have to do anything it wont so not a big overhead - you can also stagger puppet runs with splay option.

however if you have to do this then what I would suggest is disabling puppet on clients, thus stopping them running automatically - then as part of a post nexus build trigger:

mco puppet runonce ... (if running mcollective) if not running mcollective you could look at using rake/parallel shell etc to initiate a puppet run

Cheers! Stuart

edit flag offensive delete link more

answered 2016-05-11 22:03:43 -0600

DarylW gravatar image

updated 2016-05-11 22:05:39 -0600

In reference to sahumphries answer, you should have your puppet modules designed to be idempotent... they only update things if a value has changed. You could do this by comparing versions, md5's of staged artifacts, etc...

If you have a manual 'exec' that is pulling down the file, you should properly use onlyif/unless/creates conditions to ensure that it only performs the action when required, not every puppet run.

If you need more specific clarification, let us know! I don't know your exact use case... what type of artifacts are you deploying from nexus? Have you looked into any of the modules on the forge for pulling down from nexus? (

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-05-10 10:09:17 -0600

Seen: 24 times

Last updated: May 11 '16