I am checking the file content in file1(which is in puppet master) with file2(which is in agent machine).
if the content are same mean i replace the file1 from master with file2 in agent.
if the content are different mean do nothing.so that i am using the file resource like below,
class ysample::testing3{
file{"/opt/ytesting/ymyfiles.txt":
ensure=>"file",
source=> "puppet://puppetmaster.solartis.net/ysample_home/ymyfiles.txt",
source_permissions=>"use",
recurse => "true",
show_diff => "true",
validate_cmd =>"/opt/ytesting -t -f %",
validate_replacement => "%",
}
}
but it will not replace the file with same timestamp .
give the solution to replace the file with same timestamp and how to check whether our resource are apply or not ?
after i executing this command
-rw-r--r-- 1 root root 37 Dec 22 18:51 ymyfiles.txt >>>(in master machine)
-rw-r--r-- 1 root root 37 Dec 22 18:19 ymyfiles.txt >>>(in agent machine)
↧