ansible提权操作
生活随笔
收集整理的這篇文章主要介紹了
ansible提权操作
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
1.先創(chuàng)建遠(yuǎn)程HOST的ip文件
例如:cat? <<EOF>/home/test/ip.txt
>10.1.1.1
>10.1.1.2
>10.1.1.3
>EOF
2.遠(yuǎn)程操作:
ansible -i /home/test/ip.txt? all? ?-m? shell -a "df -lh"? -b --become-method=su -K
?
轉(zhuǎn)載于:https://www.cnblogs.com/lalalaxixixi/p/11438598.html
總結(jié)
以上是生活随笔為你收集整理的ansible提权操作的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: CPU缓存和内存屏障
- 下一篇: shell判断IP地址是否合法