|
Sam Coffland |
at Mar 3, 2015 at 5:39 am
|
⇧ |
| |
Found this old post when looking for a way to do this. I wrote the
following short script for this purpose.
It will give you a diff of each copy of a file you search for compared to
the next older version in the file bucket starting with the current file.
Hope it helps someone else as the file bucket can be a pain to dig through
manually.
get_filebucket_diffs
#!/bin/bash
filename=$1
for i in $(grep -rl --include=paths $1 /var/lib/puppet/clientbucket | sed
's/path/content/g' | xargs -r ls -1t); do
echo diff $1 from date \'$( stat -c %z $filename )\' to $1 from
date \'$( stat -c %z $i )\'
diff -b $filename $i
filename=$i
done
example: get_filebucket_diffs /etc/my.cnf
On Tuesday, May 15, 2012 at 2:52:18 AM UTC-5, Émile wrote:Hi,
I have make a pull request with the filebucket patch who do that :
https://github.com/puppetlabs/puppet/pull/779If you want to test ...
�mile
Peter Horvath a �crit :
Hello,
Does anybody know how to compare a filebucketed file easily with the
current file based on these infos?
info: /Stage[main]/Nginx/File[/etc/nginx/nginx.conf]: Filebucketed
/etc/nginx/nginx.conf to puppet with sum
90dbcd7cf0accf5d372d077a6c90020c
remote: notice:
/Stage[main]/Nginx/File[/etc/nginx/nginx.conf]/content: content
changed '{md5}90dbcd7cf0accf5d372d077a6c90020c' to
'{md5}26e643361f26cdf766199a830417c8bf'
Thank you
Peter
--
You received this message because you are subscribed to the Google
Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com
<javascript:>.
To unsubscribe from this group, send email to
puppet-users...@googlegroups.com <javascript:>.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en. --
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/3e89ced2-e58e-4c7d-b97d-717cf6f36ec2%40googlegroups.com.For more options, visit
https://groups.google.com/d/optout.