ansible 常用命令

ansible -i hosts 172.16.100.197 -m setup  # -i 指定 hosts 文件,
ansible webServer -m command -a 'echo 123456 |passwd --stdin yunwei'   # 配置密码
ansible -i hosts 172.16.100.197 -m setup -a "filter=ansible_distribution"  # 获取系统信息

posted @ 2022-12-24 21:11  Star-Hitian  阅读(24)  评论(0编辑  收藏  举报