fabfile.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:automated-deployments 作者: antoniocarlosortiz 项目源码 文件源码
def create_deployer_user():
    """
    Create a user for the user group
    """

    # TODO: use useradd instead of adduser so password and other details can
    # be added with just one command.
    run('adduser {}'.format(env.user_name))
    run('usermod -a -G {} {}'.format(env.user_group, env.user_name))
    run('mkdir /home/{}/.ssh'.format(env.user_name))
    run('chown -R {} /home/{}/.ssh'.format(env.user_name, env.user_name))
    run('chgrp -R {} /home/{}/.ssh'.format(
        env.user_group, env.user_name))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号