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))
fabfile.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录