Schedule Vcsrepo to sync local with remote

16 views
Skip to first unread message

mike r

unread,
Feb 3, 2016, 3:18:57 PM2/3/16
to Puppet Users
Hello everyone, 

Im trying to use vcsrepo to sync my PE Master files with a remote git repository

I wanted to sync every 15 min in case there are new commits on remote. Is there a way to set vcsrepo to run on PE Master periodically without using a cron job?

this is what my vcsrepo class looks like,


cat vcsrepo.pp

 vcsrepo { "${modulepath}/nginx/files/repo":
    ensure   => latest,
    provider => git,
    revision => 'master',
    force    => true,
  }

Trying to avoid using cron but cant figure if its possible to run this on PE Master as 'puppet apply vcsrepo.pp' every 15 min or so. 

Felix Frank

unread,
Feb 11, 2016, 10:40:25 PM2/11/16
to puppet...@googlegroups.com
On 02/03/2016 04:18 PM, mike r wrote:
> Trying to avoid using cron but cant figure if its possible to run this
> on PE Master as 'puppet apply vcsrepo.pp' every 15 min or so.
>

Well `puppet apply` is definitely a great way to do this, but guess
what: The best way to do *that* periodically is...cron. :-)

HTH,
Felix
Reply all
Reply to author
Forward
0 new messages