1. Vladimir Mihailenco
  2. fabdeploy

Commits

Vladimir Mihailenco  committed a3c74eb

Clean up redis tasks

  • Participants
  • Parent commits 48073d0
  • Branches default

Comments (0)

Files changed (1)

File fabdeploy/redis.py

View file
  • Ignore whitespace
-from fabric.api import sudo, abort
+from fabric.api import sudo
 
 from . import system
 from .task import Task
 
 
-__all__ = ['install']
+__all__ = ['add_ppa', 'install']
 
 
-class Install(Task):
+class AddPpa(Task):
     def do(self):
         if self.conf.os in ['lucid', 'maverick', 'natty']:
             sudo('add-apt-repository ppa:rwky/redis')
             system.aptitude_update.run(force=True)
-            system.aptitude_install.run(packages='redis-server')
-        else:
-            abort('Fabdeploy can not install on %(os)s yet...')
-        sudo('rm --force /etc/nginx/sites-enabled/default')
+
+add_ppa = AddPpa()
+
+
+class Install(Task):
+    def do(self):
+        system.aptitude_install.run(packages='redis-server')
 
 install = Install()