From 45a96393468dd2b1d5ca14499727032174926e44 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Mon, 26 Jun 2023 20:02:08 +1000 Subject: [PATCH 1/2] Changed r10k to update every 5 minutes --- site/profiles/manifests/puppet/r10k.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/profiles/manifests/puppet/r10k.pp b/site/profiles/manifests/puppet/r10k.pp index c5e8e85..6694540 100644 --- a/site/profiles/manifests/puppet/r10k.pp +++ b/site/profiles/manifests/puppet/r10k.pp @@ -65,7 +65,7 @@ class profiles::puppet::r10k ( [Unit] Description=puppet-r10k downloader timer [Timer] - OnCalendar=*:0/1 + OnCalendar=*:0/5 RandomizedDelaySec=1s [Install] WantedBy=timers.target From 754241bcf2a0fe0bc281c5238cbd875e7176a460 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Mon, 26 Jun 2023 20:06:15 +1000 Subject: [PATCH 2/2] Added class to manage installing the git client --- site/profiles/manifests/git/git.pp | 24 ++++++++++++++++++++++++ site/profiles/manifests/puppet/enc.pp | 4 +--- site/profiles/manifests/puppet/r10k.pp | 4 +--- 3 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 site/profiles/manifests/git/git.pp diff --git a/site/profiles/manifests/git/git.pp b/site/profiles/manifests/git/git.pp new file mode 100644 index 0000000..ca3b4e7 --- /dev/null +++ b/site/profiles/manifests/git/git.pp @@ -0,0 +1,24 @@ +# Class: profiles::git::git +# +# This class ensures that the Git package is installed. +# +# It uses the 'package' resource to manage the Git package, +# and will ensure that it is installed. This class does not +# manage any configurations related to Git, it only ensures +# that the package is installed. +# +# The class does not take any parameters. +# +# Example usage: +# -------------- +# To use this class, you simply need to declare it in your manifest: +# +# include profiles::git::git +# +# You do not need to pass any parameters. +# +class profiles::git::git { + package { 'git': + ensure => installed, + } +} diff --git a/site/profiles/manifests/puppet/enc.pp b/site/profiles/manifests/puppet/enc.pp index 5ab06ef..6745587 100644 --- a/site/profiles/manifests/puppet/enc.pp +++ b/site/profiles/manifests/puppet/enc.pp @@ -37,9 +37,7 @@ class profiles::puppet::enc ( String $enc_repo, ) { - package { 'git': - ensure => installed, - } + include profiles::git::git vcsrepo { '/opt/puppetlabs/enc': ensure => latest, diff --git a/site/profiles/manifests/puppet/r10k.pp b/site/profiles/manifests/puppet/r10k.pp index 6694540..c404be7 100644 --- a/site/profiles/manifests/puppet/r10k.pp +++ b/site/profiles/manifests/puppet/r10k.pp @@ -37,9 +37,7 @@ class profiles::puppet::r10k ( String $r10k_repo, ){ - package { 'git': - ensure => installed, - } + include profiles::git::git vcsrepo { '/etc/puppetlabs/r10k': ensure => latest,