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 配置
相关文章
相关标签/搜索