From 56518f1fcb94d265f4add099351e844194555fb4 Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Sat, 4 Nov 2023 20:25:35 +1100 Subject: [PATCH] feat: change enc repo to be tagged - enc repository will download a specific tag - defaults to master - hiera set to release tag '0.1' --- hieradata/common.yaml | 4 +++- site/profiles/manifests/puppet/enc.pp | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/hieradata/common.yaml b/hieradata/common.yaml index 3a828ea..b8267f4 100644 --- a/hieradata/common.yaml +++ b/hieradata/common.yaml @@ -40,7 +40,9 @@ profiles::puppet::client::runtimeout: 3600 profiles::puppet::client::show_diff: true profiles::puppet::client::usecacheonfailure: false -profiles::puppet::enc::enc_repo: https://git.unkin.net/unkinben/puppet-enc.git +profiles::puppet::enc::repo: https://git.unkin.net/unkinben/puppet-enc.git +profiles::puppet::enc::release: '0.1' +profiles::puppet::enc::force: true profiles::puppet::r10k::r10k_repo: https://git.unkin.net/unkinben/puppet-r10k.git profiles::puppet::g10k::bin_path: '/opt/puppetlabs/bin/g10k' profiles::puppet::g10k::cfg_path: '/etc/puppetlabs/r10k/r10k.yaml' diff --git a/site/profiles/manifests/puppet/enc.pp b/site/profiles/manifests/puppet/enc.pp index 6745587..4e84227 100644 --- a/site/profiles/manifests/puppet/enc.pp +++ b/site/profiles/manifests/puppet/enc.pp @@ -34,7 +34,9 @@ # This is designed to work on Unix-like systems only. # class profiles::puppet::enc ( - String $enc_repo, + String $repo, + String $release = 'master', + Boolean $force = false, ) { include profiles::git::git @@ -42,7 +44,9 @@ class profiles::puppet::enc ( vcsrepo { '/opt/puppetlabs/enc': ensure => latest, provider => git, - source => $enc_repo, + source => $repo, + revision => $release, + force => $force, require => Package['git'], }