From: Matthaus Litteken Date: Mon, 23 Jan 2012 21:05:59 +0000 (-0800) Subject: (#12094) Replace name with path in file resources X-Git-Tag: 0.0.1~14^2~3 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=0fb5f78379ef167d30770d14d6fee2b6787eeadd;p=puppet-modules%2Fpuppetlabs-apt.git (#12094) Replace name with path in file resources When the name is used with a file resource, it becomes difficult to test the resource using rspec-puppet, as the name parameter gets aliased to path. So to maintain consistency between tests and manifests, this replaces all name parameters in file resources with the equivalent path parameter. --- diff --git a/manifests/init.pp b/manifests/init.pp index 8042c8b..59a56e3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -29,7 +29,7 @@ class apt( package { "python-software-properties": } file { "sources.list": - name => "${apt::params::root}/sources.list", + path => "${apt::params::root}/sources.list", ensure => present, owner => root, group => root, @@ -37,7 +37,7 @@ class apt( } file { "sources.list.d": - name => "${apt::params::root}/sources.list.d", + path => "${apt::params::root}/sources.list.d", ensure => directory, owner => root, group => root, diff --git a/manifests/pin.pp b/manifests/pin.pp index 3485b24..40695af 100644 --- a/manifests/pin.pp +++ b/manifests/pin.pp @@ -9,7 +9,7 @@ define apt::pin( include apt::params file { "${name}.pref": - name => "${apt::params::root}/preferences.d/${name}", + path => "${apt::params::root}/preferences.d/${name}", ensure => file, owner => root, group => root, diff --git a/manifests/source.pp b/manifests/source.pp index 65afefd..9f040b7 100644 --- a/manifests/source.pp +++ b/manifests/source.pp @@ -17,7 +17,7 @@ define apt::source( file { "${name}.list": - name => "${apt::params::root}/sources.list.d/${name}.list", + path => "${apt::params::root}/sources.list.d/${name}.list", ensure => file, owner => root, group => root,