summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2015-12-10 12:30:52 +0100
committervarac <varacanero@zeromail.org>2015-12-10 12:30:52 +0100
commit1f9da0490a3d55831e2b834ab5801c629123d226 (patch)
treeaef163ed0a947aeb63e29f30e0a3a75efaf3bace /puppet
parentefed34739df6cafbb5f5e8144aa98a87d96d6924 (diff)
[bug] Configure default sources.platform.apt.basic
Providing a custom sources.platform.apt.basic value worked with the last commit, but without that the platform would fail. So we provide a default value now in provider_base/common.json, which can get overridden.
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/site_apt/manifests/init.pp14
-rw-r--r--puppet/modules/site_apt/manifests/leap_repo.pp8
2 files changed, 8 insertions, 14 deletions
diff --git a/puppet/modules/site_apt/manifests/init.pp b/puppet/modules/site_apt/manifests/init.pp
index 5d177e7f..c809a837 100644
--- a/puppet/modules/site_apt/manifests/init.pp
+++ b/puppet/modules/site_apt/manifests/init.pp
@@ -1,17 +1,17 @@
# setup apt on all nodes
class site_apt {
- $sources = hiera('sources')
- $apt_config = $sources['apt']
+ $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']
+ $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']
+ $platform_sources = $sources['platform']
+ $apt_url_platform_basic = $platform_sources['apt']['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 317c2f12..a1382374 100644
--- a/puppet/modules/site_apt/manifests/leap_repo.pp
+++ b/puppet/modules/site_apt/manifests/leap_repo.pp
@@ -4,14 +4,8 @@ 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 => $content,
+ content => "deb ${::site_apt::apt_url_platform_basic} ${::lsbdistcodename} main\n",
before => Exec[refresh_apt]
}