ansible远程切换用户执行命令

ansible test -l 10.0.10.1 -e "ansible_become_user=www" -m shell -a "/data/publish/publish.sh /"

 

posted @ 2018-01-06 10:14  行知散人  阅读(1919)  评论(0编辑  收藏  举报