Permalink
Browse files

Some more config options

  • Loading branch information...
1 parent 23bf50e commit 13661ed9f8d42a4683a8d802531216d215f41680 @flashingpumpkin flashingpumpkin committed Oct 5, 2012
Showing with 14 additions and 6 deletions.
  1. +13 −5 provision/__init__.py
  2. +1 −1 setup.py
View
@@ -7,7 +7,7 @@
import sys
import tempfile
-__version__ = '0.0.6'
+__version__ = '0.0.7'
DEFAULTS = dict(
path='/var/chef',
@@ -48,14 +48,17 @@ def _get_json(self):
json = property(fget=_get_json)
chef = ChefDict(DEFAULTS)
+chef.apt = True
def apt():
- sudo('apt-get update')
- sudo('apt-get -y upgrade')
- sudo('apt-get install -y ruby ruby-dev wget %s' % ' '.join(CHEF_DEPENDENCIES.split('\n')))
+ if chef.apt:
+ sudo('apt-get update')
+ sudo('apt-get -y upgrade')
+
def gems():
+ sudo('apt-get install -y ruby ruby-dev wget %s' % ' '.join(CHEF_DEPENDENCIES.split('\n')))
ctx = {
'filename':'%(path)s/rubygems-%(gems)s.tgz' % chef,
'url':'http://production.cf.rubygems.org/rubygems/rubygems-%(gems)s.tgz' % chef,
@@ -121,13 +124,18 @@ def upload():
files.append(ctx['solo.rb'], SOLO_RB % chef, use_sudo=True)
@task(default=True)
-def provision(omnibus=False):
+@parallel
+def provision(omnibus=True):
sudo('mkdir -p %(path)s' % chef)
+
apt()
+
if omnibus or chef.use_omnibus_installer:
omnibus_install()
else:
gems()
+
upload()
+
with cd(chef.path):
sudo('chef-solo -c solo.rb -j node.json')
View
@@ -3,7 +3,7 @@
METADATA = dict(
name='fabric-provision',
- version='0.0.6',
+ version='0.0.7',
author='Alen Mujezinovic',
author_email='alen@caffeinehit.com',
description='Server provisioning with Chef',

0 comments on commit 13661ed

Please sign in to comment.