centos7最小化安裝ansiblespython
一、error: cffi 1.6.0 is installed but cffi>=1.7 is required by set(['cryptography'])json
yum remove -y python-cffi pip install cffi>=1.8.0
wget https://bootstrap.pypa.io/ez_setup.py -O - | pythonbootstrap
安裝ansible centos
#easy_install simplejsonbash
#easy_install pipssh
#yum install gcc python-develide
#easy_install ansible測試
ansible驗證安裝ui
設置無密碼ssh訪問遠程主機:centos7
#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" }