ansible 将脚本执行到多台客户端

ansible -i  hosts task -m script -a '脚本'

例如:ansible task -m script -a ./tj.sh -i hosts

在hosts 里面要定义用户密码

  

  

posted @ 2022-07-09 14:36  LB_运维技术  阅读(25)  评论(0编辑  收藏  举报