Skip to content

Instantly share code, notes, and snippets.

@ranjib
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ranjib/237c51b94cf8ae0a2462 to your computer and use it in GitHub Desktop.
Save ranjib/237c51b94cf8ae0a2462 to your computer and use it in GitHub Desktop.
Upgrade chef
config(:chef, node_name: 'foo', client_key: '/path/to/client.pem', chef_server_url: 'https://foo.bar.com')
config(:ssh, user: 'foo', password: 'bar')
[
'sudo apt-get remove chef --purge -y',
'sudo rm -rf /opt/chef',
'sudo rm -rf /etc/chef/client.d',
'wget -c https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/13.04/x86_64/chef-xxx.deb',
'sudo dpkg -i chef-xxx.deb',
'sudo env -i /opt/chef/bin/chef-client',
'rm chef-xxx.deb'
].each do |cmd|
ssh_task cmd
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment