CentOS5.8 升級python至2.6.6 並安裝ansible

yum install openssl openssl-devel


tar jxvf Python-2.6.6.tar.bz2 

cd Python-2.6.6

./configure

make && make install


[root@relearn ~]# python

Python 2.6.6 (r266:84292, Aug 19 2015, 14:08:38) 

[GCC 4.1.2 20080704 (Red Hat 4.1.2-55)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> 


install python-setuptools

wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py

python ez_setup.py --insecure


easy_install pip

pip install paramiko PyYAML Jinja2 httplib2 six


pip install ansible


yum install python-simplejson -y

yum install libselinux-python -y



ansible執行的時候會按照以下順序查找配置項:


* ANSIBLE_CONFIG (環境變量)

* ansible.cfg (當前目錄下)

* .ansible.cfg (用戶家目錄下)

* /etc/ansible/ansible.cfg


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章