示例#1
0
 def create_group(self, group):
     if group:
         with fabset(warn_only=True):
             run(env.facts.sudo + 'groupadd ' + group)
示例#2
0
 def packager(self):
     if self._packager is None:
         with fabset(warn_only=True):
             result = run('rpm -v')
         self._packager = 'deb' if result.failed else 'rpm'
     return self._packager
示例#3
0
 def create_user(self, user):
     if user:
         with fabset(warn_only=True):
             run(env.facts.sudo + 'useradd ' + user)
示例#4
0
 def uwsgi(self):
     package.install('python-dev', 'libxml2-dev')
     module.install('uwsgi')
     action.render('uwsgi.conf', '/etc/init/uwsgi.conf')
     with fabset(warn_only=True):
         run(env.facts.sudo + 'service uwsgi start')
示例#5
0
 def create_group(self, group):
     if group:
         with fabset(warn_only=True):
             run(env.facts.sudo + 'groupadd ' + group)
示例#6
0
 def create_user(self, user):
     if user:
         with fabset(warn_only=True):
             run(env.facts.sudo + 'useradd ' + user)
示例#7
0
 def packager(self):
     if self._packager is None:
         with fabset(warn_only=True):
             result = run('rpm -v')
         self._packager = 'deb' if result.failed else 'rpm'
     return self._packager
示例#8
0
 def uwsgi(self):
     package.install('python-dev', 'libxml2-dev')
     module.install('uwsgi')
     action.render('uwsgi.conf', '/etc/init/uwsgi.conf')
     with fabset(warn_only=True):
         run(env.facts.sudo + 'service uwsgi start')