diff options
author | elijah <elijah@riseup.net> | 2015-02-12 22:24:29 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-02-12 22:24:29 -0800 |
commit | 721bf57600f9730a56f744150be34aa9e96457f8 (patch) | |
tree | c27530b35582b8333773973063ab3b62f5633d8c /manifests | |
parent | 64fb988c0e37d64fb3e241dc95f156072e43bf2a (diff) |
pass custom_sources_list as a parameter instead of a global variable.
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/init.pp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index 33eac37..21e546f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -16,7 +16,8 @@ class apt( $repos = $apt::params::repos, $custom_preferences = $apt::params::custom_preferences, $disable_update = $apt::params::disable_update, - $custom_key_dir = $apt::params::custom_key_dir + $custom_key_dir = $apt::params::custom_key_dir, + $custom_sources_list = undef ) inherits apt::params { case $::operatingsystem { 'debian': { @@ -53,9 +54,10 @@ class apt( $next_codename = debian_nextcodename($codename) $next_release = debian_nextrelease($release) - $sources_content = $::custom_sources_list ? { - '' => template( "apt/${::operatingsystem}/sources.list.erb"), - default => $::custom_sources_list + if $custom_sources_list == undef { + $sources_content = template( "apt/${::operatingsystem}/sources.list.erb") + } else { + $sources_content = $custom_sources_list } file { # include main, security and backports |