6
我使用的面料來運行以下命令:面料詢問root密碼
def staging():
""" use staging environment on remote host"""
env.user = 'ubuntu'
env.environment = 'staging'
env.hosts = ['host.dev']
_setup_path()
def bootstrap():
""" initialize remote host environment (virtualenv, deploy, update) """
require('root', provided_by=('staging', 'production'))
run('mkdir -p %(root)s' % env)
run('mkdir -p %s' % os.path.join(env.home, 'www', 'log'))
create_virtualenv()
deploy()
update_requirements()
但我得到這個:
[email protected]:~/projects/proj_name$ fab staging bootstrap
[host.dev] run: mkdir -p /home/ubuntu/www/staging
Password for [email protected]:
爲什麼面料要求我的密碼?這是sudoers文件中沒有密碼的默認ubuntu root用戶。這裏發生了什麼?