centos7最小化安装ansibles
1、error: cffi 1.6.0 is installed but cffi>=1.7 is required by set(['cryptography'])
yum remove -y python-cffi pip install cffi>=1.8.0
2、easy_install command not found
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
安装ansible
#easy_install simplejson
#easy_install pip
#yum install gcc python-devel
#easy_install ansible
ansible验证安装
设置无密码ssh访问远程主机:
#ssh-keygen -t rsa #ssh-copy-id -i ~/.ssh/id_rsa.pub root@192.168.10.24
创建ansible主机列表:
默认路径 /etc/ansible/hosts 主机列表可以是静态配置文件,可通过 -i 选项指定。
#mkdir /etc/ansibles # vi /etc/ansible/hosts [test] 192.168.10.24
测试远程主机的运行状态
# ansible test -m ping 192.168.10.24 | SUCCESS => { "changed": false, "ping": "pong" }
转载于:https://blog.51cto.com/xiangcun168/1959217