What is the puppet way to do if I want to customize run interval of a special module

44 views
Skip to first unread message

Chrislynn Chee

unread,
Jun 10, 2014, 6:17:10 AM6/10/14
to puppet...@googlegroups.com
Hi all, 
I would like to know how puppet admin usually do or structure the modules, if there is a particular module that I do not which it to be applied in catalog in a normal run mode, but to be included at a custom time interval. For example, I have a special module to "sync sqlite file from my server" only in a quarterly basis. I do not want the sync to be happened in the standard puppet run interval. Can I achieve this requirement?

Thank you.   

José Luis Ledesma

unread,
Jun 10, 2014, 8:56:37 AM6/10/14
to puppet...@googlegroups.com

Hi,

Perhaps the schedule metaparameter is what you need

http://docs.puppetlabs.com/references/latest/metaparameter.html#schedule

Regards

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/bcfba352-5779-4535-b433-b510273df4e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Felix Frank

unread,
Jun 10, 2014, 8:58:14 AM6/10/14
to puppet...@googlegroups.com
Hi,

you can do this more or less, by applying a schedule to one or more
resources. The schedule makes sure that the resource is not synced
outside a specific time window. But if there happens to be no agent run
*inside* the window, then no sync will happen at all.

See http://docs.puppetlabs.com/references/latest/type.html#schedule

HTH,
Felix

Spencer Krum

unread,
Jun 10, 2014, 12:30:57 PM6/10/14
to puppet...@googlegroups.com
I think the 'Puppet' way to do this is to not do it with Puppet at all. Puppet works by inspecting the system and resolving inconsistencies. "Do a thing every quarter" maps poorly to this. The ordering of Puppet also makes it hard to do rigorous error checking and logging.

I would recommend you capture the syncing behaviour in a shell or ruby/python/perl script. Then use Puppet to put this script in place, and to set a cron job to run it at the interval you desire.

Thanks,
Spencer


--
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...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Spencer Krum
(619)-980-7820

Rich Burroughs

unread,
Jun 11, 2014, 9:24:33 PM6/11/14
to puppet...@googlegroups.com
This is the best answer, in my opinion. Spencer has it totally right. Puppet is not a substitute for scripting languages and cron. Think of it as a way to enforce a desired configuration of a node at any given moment. Things that fall outside of that are probably better candidates for other tools.


Rich
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CADt6FWN%3D-%3DDmL-pMHu60Bbujcxi5cPSVN6FzzCE2y8LtaVezBQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages