def configure(tags='', skip_tags='deploy'):
"""Setup a host using ansible scripts
Usages: fab [prod|qa|dev] configure
"""
fab.require('host_group')
cmd = 'ansible-playbook -i hosts site.yml --limit=%(host_group)s' % env
with fab.lcd('provisioner'):
if tags:
cmd += " --tags '%s'" % tags
if skip_tags:
cmd += " --skip-tags '%s'" % skip_tags
local(cmd)
评论列表
文章目录