summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-12-10 11:16:17 +0100
committervarac <varacanero@zeromail.org>2015-12-10 11:16:17 +0100
commitefed34739df6cafbb5f5e8144aa98a87d96d6924 (patch)
tree2cd38ffd77aa6bb6a7c3c2278507ca5bb99c7c48 /puppet
parent80c01ca0218d97bb6296743e142084b288ff55a9 (diff)
[feat] Make leap apt sources url configurable
So we can use the experimental-0.8 repo instead of 0.8 i.e. Use this to customize the main LEAP deb url: "sources": { "apt": { "leap": { "basic": "http://deb.leap.se/experimental-0.9" } } }
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/site_apt/manifests/init.pp16
-rw-r--r--puppet/modules/site_apt/manifests/leap_repo.pp8
2 files changed, 18 insertions, 6 deletions
diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp
index 635ba975..5d177e7f 100644
--- a/puppet/modules/site_apt/manifests/init.pp
+++ b/puppet/modules/site_apt/manifests/init.pp
@@ -1,11 +1,17 @@
# setup apt on all nodes
class site_apt {
- $sources = hiera('sources')
- $apt_config = $sources['apt']
- $apt_url_basic = $apt_config['basic']
- $apt_url_security = $apt_config['security']
- $apt_url_backports = $apt_config['backports']
+ $sources = hiera('sources')
+ $apt_config = $sources['apt']
+
+ # debian repo urls
+ $apt_url_basic = $apt_config['basic']
+ $apt_url_security = $apt_config['security']
+ $apt_url_backports = $apt_config['backports']
+
+ # leap repo url
+ $apt_config_leap = $apt_config['leap']
+ $apt_url_leap_basic = $apt_config_leap['basic']
# needed on jessie hosts for getting pnp4nagios from testing
if ( $::operatingsystemmajrelease == '8' ) {
diff --git a/puppet/modules/site_apt/manifests/leap_repo.pp b/puppet/modules/site_apt/manifests/leap_repo.pp
index 462b2686..317c2f12 100644
--- a/puppet/modules/site_apt/manifests/leap_repo.pp
+++ b/puppet/modules/site_apt/manifests/leap_repo.pp
@@ -4,8 +4,14 @@ class site_apt::leap_repo {
$platform = hiera_hash('platform')
$major_version = $platform['major_version']
+ if $::site_apt::apt_url_leap_basic == '' {
+ $content = "deb http://deb.leap.se/${major_version} ${::lsbdistcodename} main\n"
+ } else {
+ $content = "deb ${::site_apt::apt_url_leap_basic} ${::lsbdistcodename} main\n"
+ }
+
apt::sources_list { 'leap.list':
- content => "deb http://deb.leap.se/${major_version} ${::lsbdistcodename} main\n",
+ content => $content,
before => Exec[refresh_apt]
}