从源码安装的步骤
$ git clone git://github.com/ansible/ansible.git --recursive
$ cd ./ansible

使用 Bash:
$ source ./hacking/env-setup

如果没有安装pip, 请先安装对应于你的Python版本的pip:
$ sudo easy_install pip

以下的Python模块也需要安装 [1]_:
$ sudo pip install paramiko PyYAML Jinja2 httplib2 six
$ ansible all -m ping --ask-pass

配置文件:
[[email protected] ansible]#cat /etc/ansible/hosts
192.168.10.32:2222
192.168.10.169
192.168.10.150
[mysqlservers]
192.168.10.150
[servers:children]
webservers
mysqlservers

测试使用:
ansible 192.168.10.150 -m ping
ansible all -m ping

查看文档,类似与man文档
ansible-doc -l
ansible-doc -ping

ansible搭建

ansible搭建

ansible搭建

ansible搭建

ansible搭建

相关文章:

  • 2021-10-15
  • 2021-05-12
  • 2021-11-04
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
猜你喜欢
  • 2021-04-17
  • 2021-12-22
  • 2021-09-15
  • 2021-09-17
  • 2022-12-23
  • 2022-01-23
相关资源
相似解决方案