Skip to content

Instantly share code, notes, and snippets.

@matschaffer
Created April 17, 2012 00:01
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save matschaffer/2402433 to your computer and use it in GitHub Desktop.
Save matschaffer/2402433 to your computer and use it in GitHub Desktop.
bash -c '
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
yum install -y wget
wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://rbel.co/rbel5
rpm -Uvh rbel5
yum install -y rubygem-chef
'
@srininara
Copy link

I am trying to use this for the prepare step. Only catch is that yum installs an older version of chef (0.10.6). I am not able to find a way yet to overcome this. Any suggestions would be of great help.

@ikiselev
Copy link

Trying to prepare debian jessie. Got error (with -VV option): "E: Package 'libopenssl-ruby' has no installation candidate".
So, "apt-get install" exited (with error code, i suggest, that was not checked by "prepare" command). Hope this gist helps me to write own prepare command.

@bby-bishopclark
Copy link

@srininara - are you still seeing an old chef version? Specifying the right repo URL could help it choose something newer: http://packages.chef.io/repos/yum/stable/el/7/x86_64/ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment