Skip to content

Instantly share code, notes, and snippets.

@tbatchelli
Created May 8, 2013 18:14
Show Gist options
  • Save tbatchelli/5542366 to your computer and use it in GitHub Desktop.
Save tbatchelli/5542366 to your computer and use it in GitHub Desktop.
2013-05-08 11:11:35,634 DEBUG p.s.execute 192.168.56.101 ==> { cat > /var/lib/pallet/home/git-user/.ssh/config.new <<EOFpallet
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> Host github.com
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> HostName github.com
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> StrictHostKeyChecking no
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> EOFpallet
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> } && \
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:169
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> filediff= && \
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:170
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> if [ -e /home/git-user/.ssh/config ] && [ -e /var/lib/pallet/home/git-user/.ssh/config ]; then
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:172
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> # lib.clj:134
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> diff -u /home/git-user/.ssh/config /var/lib/pallet/home/git-user/.ssh/config
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:173
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> filediff=$?
2013-05-08 11:11:35,635 DEBUG p.s.execute 192.168.56.101 ==> fi && \
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:175
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> md5diff= && \
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:176
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> if [ -e /var/lib/pallet/home/git-user/.ssh/config ] && [ -e /var/lib/pallet/home/git-user/.ssh/config.md5 ]; then
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:178
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> # lib.clj:212
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> ( cd $(dirname /var/lib/pallet/home/git-user/.ssh/config.md5) && md5sum --quiet --check $(basename /var/lib/pallet/home/git-user/.ssh/config.md5) )
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:179
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> md5diff=$?
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> fi && \
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:181
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> contentdiff= && \
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:182
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> if [ -e /home/git-user/.ssh/config ] && [ -e /var/lib/pallet/home/git-user/.ssh/config.new ]; then
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:184
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> # lib.clj:134
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> diff -u /home/git-user/.ssh/config /var/lib/pallet/home/git-user/.ssh/config.new
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:185
2013-05-08 11:11:35,636 DEBUG p.s.execute 192.168.56.101 ==> contentdiff=$?
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> fi && \
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:188
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> errexit=0 && \
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:189
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> if [ "${filediff}" == "1" ]; then
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:191
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> echo Existing file did not match the pallet master copy: FAIL
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:193
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> errexit=1
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> fi && \
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:195
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> if [ "${md5diff}" == "1" ]; then
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:197
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> echo Existing content did not match md5: FAIL
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:198
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> errexit=1
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> fi && \
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:201
2013-05-08 11:11:35,637 DEBUG p.s.execute 192.168.56.101 ==> [ "${errexit}" == "0" ] && \
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:204
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> if ! ( [ "${contentdiff}" == "0" ] ) && [ -e /var/lib/pallet/home/git-user/.ssh/config.new ]; then
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:208
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> # lib.clj:77
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> cp -f --backup="numbered" /var/lib/pallet/home/git-user/.ssh/config.new /var/lib/pallet/home/git-user/.ssh/config
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:210
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> # lib.clj:61
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> mv -f /var/lib/pallet/home/git-user/.ssh/config.new /home/git-user/.ssh/config
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> fi && \
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> ( # file.clj:27
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> cp=$(readlink -f /home/git-user/.ssh/config) && \
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> cd $(dirname ${cp}) && \
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> # lib.clj:194
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> md5sum $(basename ${cp})
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> )>/var/lib/pallet/home/git-user/.ssh/config.md5 && \
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:218
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> echo MD5 sum is $(cat /var/lib/pallet/home/git-user/.ssh/config.md5) && \
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> # remote_file.clj:222
2013-05-08 11:11:35,638 DEBUG p.s.execute 192.168.56.101 ==> # lib.clj:115
2013-05-08 11:11:35,639 DEBUG p.s.execute 192.168.56.101 ==> ls -t /home/git-user/.ssh/config.~[0-9]*~ 2> /dev/null | \
2013-05-08 11:11:35,639 DEBUG p.s.execute 192.168.56.101 ==> # lib.clj:129
2013-05-08 11:11:35,639 DEBUG p.s.execute 192.168.56.101 ==> tail -n "+6" | \
2013-05-08 11:11:35,639 DEBUG p.s.execute 192.168.56.101 ==> # lib.clj:28
2013-05-08 11:11:35,639 DEBUG p.s.execute 192.168.56.101 ==> xargs \
2013-05-08 11:11:35,639 DEBUG p.s.execute 192.168.56.101 ==> rm --force
2013-05-08 11:11:35,639 DEBUG p.s.execute 192.168.56.101 ==> } || { echo '#> remote-file /home/git-user/.ssh/config : FAIL'; exit 1;} >&2
2013-05-08 11:11:35,639 DEBUG p.s.execute 192.168.56.101 ==> echo '#> remote-file /home/git-user/.ssh/config : SUCCESS'
2013-05-08 11:11:35,639 DEBUG p.s.execute 192.168.56.101 ==>
2013-05-08 11:11:35,639 DEBUG p.s.execute 192.168.56.101 ==> exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment