lib/gaptool-client.rb in gaptool-client-0.7.6 vs lib/gaptool-client.rb in gaptool-client-0.7.7

- old
+ new

@@ -311,14 +311,11 @@ unless chef_branch.nil? json['chefbranch'] = chef_branch git = "git checkout -f #{chef_branch}; git fetch --all; git reset --hard origin/#{chef_branch}" end commands = [ - "cd ~admin/ops; #{git} ", - "echo '#{json.to_json}' > ~admin/solo.json", - "sudo chef-solo -c ~admin/ops/cookbooks/solo.rb -j ~admin/solo.json -E #{environment}", - 'rm -f ~admin/solo.json' + "cd ~admin/ops; #{git} && echo '#{json.to_json}' > ~admin/solo.json && sudo chef-solo -c ~admin/ops/cookbooks/solo.rb -j ~admin/solo.json -E #{environment} && rm -f ~admin/solo.json" ] sshcmd(node, commands) end end end @@ -405,13 +402,10 @@ 'key' => ENV['GT_KEY'], 'url' => ENV['GT_URL'] } }.merge(attrs).to_json commands = [ - "cd ~admin/ops; git pull", - "echo '#{json}' > ~admin/solo.json", - "sudo chef-solo -c ~admin/ops/cookbooks/solo.rb -j ~admin/solo.json -E #{environment}", - 'rm -f ~admin/solo.json' + "cd ~admin/ops; git pull && echo '#{json}' > ~admin/solo.json && sudo chef-solo -c ~admin/ops/cookbooks/solo.rb -j ~admin/solo.json -E #{environment} && rm -f ~admin/solo.json" ] sshcmd(node, commands) end end end