Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

how to replace a file with same time in puppet master to agent?

$
0
0
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)

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>