def create_group(self, group): if group: with fabset(warn_only=True): run(env.facts.sudo + 'groupadd ' + group)
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
def create_user(self, user): if user: with fabset(warn_only=True): run(env.facts.sudo + 'useradd ' + user)
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')