diff options
author | varac <varacanero@zeromail.org> | 2015-04-29 14:23:31 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2015-04-29 14:23:31 +0200 |
commit | fdd0c448125173a69582a59e4a969f4dabcb52e7 (patch) | |
tree | 77cff4140c9e92fb0d71a91118737682969714d9 /templates/Debian-8.0-amd64-netboot/chef.sh | |
parent | baa558a70efcba73f909752331aabb2056c74f50 (diff) |
added templates/Debian-8.0-amd64-netboot based on original Debian-7.7.0-amd64-netboot veewee template
Diffstat (limited to 'templates/Debian-8.0-amd64-netboot/chef.sh')
-rw-r--r-- | templates/Debian-8.0-amd64-netboot/chef.sh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/templates/Debian-8.0-amd64-netboot/chef.sh b/templates/Debian-8.0-amd64-netboot/chef.sh new file mode 100644 index 0000000..cd11958 --- /dev/null +++ b/templates/Debian-8.0-amd64-netboot/chef.sh @@ -0,0 +1,49 @@ +if [ -f .veewee_params ] +then + . .veewee_params +fi + +# Default to Gem install +if [ -z "$CHEF_INSTALLMETHOD" ]; then + export CHEF_INSTALLMETHOD="gems" +fi + +# Installing chef +case $CHEF_INSTALLMETHOD in + "gems") + # Using gems + if [ -z "$CHEF_VERSION" ]; then + # Default to latest + gem install chef --no-ri --no-rdoc + else + gem install chef --no-ri --no-rdoc --version $CHEF_VERSION + fi + ;; + + "omnibus") + # Using omnibus + if [ -z "$CHEF_VERSION" ]; then + # Default to latest + wget -O - http://opscode.com/chef/install.sh | sudo bash -s + else + wget -O - http://opscode.com/chef/install.sh | sudo bash -s -- -v $CHEF_VERSION + fi + ;; + + "package") + # Using packages + apt-get install -y debconf-utils + echo "chef chef/chef_server_url string $CHEF_SERVER_URL" | debconf-set-selections + if [ -z "$CHEF_VERSION" ]; then + # Default to latest + apt-get install -y chef + else + apt-get install -y chef=$CHEF_VERSION + fi + ;; + + *) + echo "Unsupported method for installing chef" + exit -1 + ;; +esac |