From 3ee27350198de87fe7fbd433cb481569d2fff1ea Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Wed, 9 Sep 2020 13:51:36 +0200 Subject: [PATCH] Add hiera param to disable rccn vcsrepo In a development, you may not want puppet to change the remote and branch in the rccn repo, so now you can disable that by setting the hiera param 'notouchrepo' - which cause the repo to rnu with a schedule of 'never' --- modules/rhizo_base/manifests/init.pp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/rhizo_base/manifests/init.pp b/modules/rhizo_base/manifests/init.pp index f18a6bc..fbef2ee 100644 --- a/modules/rhizo_base/manifests/init.pp +++ b/modules/rhizo_base/manifests/init.pp @@ -18,6 +18,7 @@ class rhizo_base { # Configuration settings $notouchcron = hiera('rhizo::notouchcron', 0) + $notouchrepo = hiera('rhizo::notouchrepo', 0) $use_ups = hiera('rhizo::use_ups') $rhizomatica_dir = hiera('rhizo::rhizomatica_dir') $hlr_db = hiera('rhizo::hlr_db', '/var/lib/osmocom/hlr.db') @@ -266,6 +267,10 @@ schedule { 'repo': repeat => 1, } +schedule { 'never': + period => never, +} + #Rhizomatica scripts file { '/home/rhizomatica/bin': ensure => directory, @@ -354,8 +359,14 @@ schedule { 'repo': require => File['/var/rhizo_backups'], } + if ($notouchrepo == "0") { + $rsched = "always" + } else { + $rsched = "never" + } + vcsrepo { '/var/rhizomatica': - schedule => 'always', + schedule => $rsched, ensure => latest, provider => git, source => 'git@dev.rhizomatica.org:rhizomatica/rccn.git',