hosts文件http://www.cndba.cn/hbhe0316/article/108060http://www.cndba.cn/hbhe0316/article/108060
http://www.cndba.cn/hbhe0316/article/108060
192.168.56.150 ansible_ssh_user='test' ansible_ssh_pass='wwwwww' ansible_become_pass='wwwwww' remote_src=no
将test用户加入/etc/sudoer文件http://www.cndba.cn/hbhe0316/article/108060
http://www.cndba.cn/hbhe0316/article/108060
http://www.cndba.cn/hbhe0316/article/108060
test ALL=(ALL) ALL
执行命令http://www.cndba.cn/hbhe0316/article/108060
http://www.cndba.cn/hbhe0316/article/108060
http://www.cndba.cn/hbhe0316/article/108060http://www.cndba.cn/hbhe0316/article/108060
ansible -i hosts oracle --become-method sudo --become-user root -m shell -a '/home/test/oracleHealthCheck.sh' -become=true
版权声明:本文为博主原创文章,未经博主允许不得转载。
oracle