diff options
Diffstat (limited to 'files/puppet/modules/custom')
-rw-r--r-- | files/puppet/modules/custom/manifests/apt/additional_sources.pp | 24 | ||||
-rw-r--r-- | files/puppet/modules/custom/manifests/init.pp | 7 |
2 files changed, 31 insertions, 0 deletions
diff --git a/files/puppet/modules/custom/manifests/apt/additional_sources.pp b/files/puppet/modules/custom/manifests/apt/additional_sources.pp new file mode 100644 index 0000000..029c92d --- /dev/null +++ b/files/puppet/modules/custom/manifests/apt/additional_sources.pp @@ -0,0 +1,24 @@ +# Add additional sources and configure unattended updates for it +define custom::apt::additional_sources ( + $ensure = 'present', + $signed_by = '[signed-by=/usr/share/keyrings/leap-archive.gpg]', + $repodomain = 'deb.leap.se', + $project = 'platform', + $dist = $::lsbdistcodename, + $component = 'master' +){ + + apt::sources_list { "${name}.list": + ensure => $ensure, + content => "deb ${signed_by} http://${repodomain}/${project} ${dist} ${component}", + } + + apt::apt_conf { "52unattended-upgrades-${name}": + content => "Unattended-Upgrade::Origins-Pattern { + \"site=${repodomain},component=${component}\"; +}", + require => Package['unattended-upgrades'], + refresh_apt => false, + } + +} diff --git a/files/puppet/modules/custom/manifests/init.pp b/files/puppet/modules/custom/manifests/init.pp index bd3f4e3..db5dfbb 100644 --- a/files/puppet/modules/custom/manifests/init.pp +++ b/files/puppet/modules/custom/manifests/init.pp @@ -22,4 +22,11 @@ class custom { include custom_munin_node::openvpn } + # Use additional packages from master repo + if $::domain == 'unstable.bitmask.net' { + ::custom::apt::additional_sources {'leap-master': + component => 'master' + } + } + } |