ansible 普通用戶執行root權限 su

[root@web-10 ~]# ansible  -i /etc/ansible/hosts rt01 -s -m shell -a "netstat -tunpl"web 加-sshell hosts配置文件添加ansible_su_passssh 10.0.0.177 ansible_ssh_pass=xxxxx   ansible_su_pass=xxxx 配置
相關文章
相關標籤/搜索