From e0d644221e677dbdf3f4c8630d5e49e02775741f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 25 Jan 2013 17:30:47 -0200 Subject: Using explicit variable scoping --- manifests/nodo.pp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/nodo.pp b/manifests/nodo.pp index f57e86d..36b04a5 100644 --- a/manifests/nodo.pp +++ b/manifests/nodo.pp @@ -68,8 +68,8 @@ class nodo { $apt_domain_source = hiera('nodo::apt_domain_source', false) - apt::sources_list { "$domain.list": - source => "puppet:///modules/site_apt/sources.list.d/$operatingsystem/$domain.list", + apt::sources_list { "${::domain}.list": + source => "puppet:///modules/site_apt/sources.list.d/${::operatingsystem}/${::domain}.list", ensure => $apt_domain_source ? { true => present, default => absent, @@ -77,12 +77,12 @@ class nodo { } # Preferences file can't have dots in the filename - $apt_domain_preferences = regsubst($domain, '\.', '-', 'G') + $apt_domain_preferences = regsubst($::domain, '\.', '-', 'G') - file { "/etc/apt/preferences.d/$apt_domain_preferences": - source => [ "puppet:///modules/site_apt/preferences.d/$operatingsystem/$domain", + file { "/etc/apt/preferences.d/${apt_domain_preferences}": + source => [ "puppet:///modules/site_apt/preferences.d/${::operatingsystem}/${::domain}", "puppet:///modules/nodo/preferences.d/custom" ], - ensure => $apt_domain_source ? { + ensure => ${apt_domain_source} ? { true => present, default => absent, } -- cgit v1.2.3