Update fabfile to user global environment configuration, abstracted tasks for platform, webserver and database manager

This commit is contained in:
Roberto Rosario
2012-06-01 01:55:09 -04:00
parent ccf41ae67d
commit 9f0d7966bc
21 changed files with 374 additions and 196 deletions

View File

@@ -0,0 +1,25 @@
from fabric.api import run, sudo, cd, env, task
from ..literals import DB_MYSQL
import mysql
@task
def create_database():
"""
Create the Mayan EDMS database
"""
if env.database_manager == DB_MYSQL:
mysql.create_database()
@task
def drop_database():
"""
Drop Mayan EDMS's database
"""
if env.database_manager == DB_MYSQL:
mysql.drop_database()