定义主机组用户和密码

 [webservers]
 ansible[01:04] ansible_ssh_user='root' ansible_ssh_pass='AAbb0101'



                                                                 

[root@ftp:/root]
> ansible webservers -m ping -o 
ansible01 | SUCCESS => {"changed": false, "ping": "pong"}
ansible04 | SUCCESS => {"changed": false, "ping": "pong"}
ansible02 | SUCCESS => {"changed": false, "ping": "pong"}
ansible03 | SUCCESS => {"changed": false, "ping": "pong"}

  

相关文章:

  • 2022-12-23
  • 2021-10-25
  • 2021-10-03
  • 2021-05-15
  • 2021-09-15
  • 2021-06-25
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-07
  • 2021-10-27
  • 2022-12-23
相关资源
相似解决方案