]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
(#12094) Replace name with path in file resources
authorMatthaus Litteken <matthaus@puppetlabs.com>
Mon, 23 Jan 2012 21:05:59 +0000 (13:05 -0800)
committerMatthaus Litteken <matthaus@puppetlabs.com>
Mon, 23 Jan 2012 21:25:52 +0000 (13:25 -0800)
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.

manifests/init.pp
manifests/pin.pp
manifests/source.pp

index 8042c8be198a2e1c50938899c76151700d63abde..59a56e3f3252f0cf7cdbaf7ce7fa5a68659df271 100644 (file)
@@ -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,
index 3485b2473d1aa11ac3d55f34133a697427df0bdc..40695af5fa8f84eb4cba4a2ca26ebd84b57818d4 100644 (file)
@@ -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,
index 65afefdbe1b10550182b3eb785fa1922a949074e..9f040b7734760dad30f96c969debf9801e9f8b87 100644 (file)
@@ -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,