Puppet: System Administration Automated

Support

Ticket #872: file-content-replace.patch

File file-content-replace.patch, 0.6 kB (added by ctrlaltdel, 1 year ago)
  • a/lib/puppet/type/pfile/content.rb

    old new  
    3434 
    3535        # Override this method to provide diffs if asked for. 
    3636        def insync?(is) 
     37            if ! @resource.replace? and File.exists?(@resource[:path]) 
     38                return true 
     39            end 
     40 
    3741            result = super 
    3842            if ! result and Puppet[:show_diff] and File.exists?(@resource[:path]) 
    3943                string_file_diff(@resource[:path], self.should)