diff options
-rw-r--r-- | lib/puppet/type/pfile.rb | 10 | ||||
-rwxr-xr-x | lib/puppet/type/pfile/source.rb | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index 3dd201baa..ab990d67b 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -117,7 +117,15 @@ module Puppet desc "Whether or not to replace a file that is sourced but exists. This is useful for using file sources purely for initialization." - defaultto true + newvalues(:true, :false) + defaultto :true + end + + newparam(:force) do + desc "Force the file operation. Currently only used when replacing + directories with links." + newvalues(:true, :false) + defaultto false end newparam(:ignore) do diff --git a/lib/puppet/type/pfile/source.rb b/lib/puppet/type/pfile/source.rb index 1d00f7a3d..744d66f34 100755 --- a/lib/puppet/type/pfile/source.rb +++ b/lib/puppet/type/pfile/source.rb @@ -135,7 +135,7 @@ module Puppet # if replace => false then fake the checksum so that the file # is not overwritten. unless @is == :absent - unless @parent[:replace] + if @parent[:replace] == :false info "Not replacing existing file" @is = @stats[:checksum] end |