diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/puppet/type/file.rb | 3 | ||||
-rwxr-xr-x | lib/puppet/type/file/source.rb | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/puppet/type/file.rb b/lib/puppet/type/file.rb index 155cf62f4..24ffc4a95 100644 --- a/lib/puppet/type/file.rb +++ b/lib/puppet/type/file.rb @@ -691,8 +691,7 @@ module Puppet } # If the file doesn't exist but we have a source, then call - # retrieve on the source property so it will set the 'should' - # values all around. + # set our 'should' values based on the source file. if @parameters.include?(:source) @parameters[:source].copy_source_values end diff --git a/lib/puppet/type/file/source.rb b/lib/puppet/type/file/source.rb index 60d4a5708..04a6931f9 100755 --- a/lib/puppet/type/file/source.rb +++ b/lib/puppet/type/file/source.rb @@ -129,7 +129,8 @@ module Puppet end end - @resource[:ensure] = metadata.ftype + # Set the 'ensure' value, unless we're trying to delete the file. + @resource[:ensure] = metadata.ftype unless @resource[:ensure] == :absent if metadata.ftype == "link" @resource[:target] = metadata.destination |