ansible初识(四)--ansible系列命令ansible及主机模式
实例演示
查询当前版本ansible有多少个可用模块
[[email protected] ~]# ansible-doc -l | wc -l
3387

查询每一个组中有哪些主机
ansible初识(四)--ansible系列命令ansible及主机模式
此命令用到了-u,表示主控端对被控端的某个用户进行操作
ansible初识(四)--ansible系列命令ansible及主机模式

ansible的主机模式:

[[email protected] ~]# ansible --help
Usage: ansible [options]
主机模式
ansible初识(四)--ansible系列命令ansible及主机模式
实例演示:
ansible初识(四)--ansible系列命令ansible及主机模式
ansible初识(四)--ansible系列命令ansible及主机模式
实例演示
ansible初识(四)--ansible系列命令ansible及主机模式
表示不在app组中但是在webservers组中的主机,
注意,逻辑非为单引号,逻辑与单双引号都都可以

相关文章:

  • 2020-06-02
  • 2021-09-29
  • 2018-11-24
  • 2020-05-19
  • 2018-05-26
  • 2019-01-25
  • 2021-11-09
  • 2021-09-12
猜你喜欢
  • 2020-03-29
  • 2018-11-03
  • 2019-12-03
  • 2021-10-24
  • 2021-08-21
  • 2022-01-07
  • 2021-08-06
  • 2021-08-28
相关资源
相似解决方案