環境:
sudo apt-get install build-essential libssl-dev libffi-dev python-dev pyenv install -l | grep -v - | tr -d ' ' | grep '^3.10' 3.10.0 3.10.1 3.10.2 pyenv install 3.10.2 python -V Python 3.10.2 pyenv local 3.10.2 python3 -m pip install --upgrade pip python3 -m pip install --user ansible
sudo yum install -y epel-release sudo yum install -y ansible sshpass
sudo yum -y install ansible sshpass python-crypto2.6 --enablerepo=epel
yum install python-setuptools easy_install pip pip install ansible # バージョンを指定してインストール pip install ansible==1.9.4 --upgrade
sudo aptitude install ansible
sudo yum install python26 python26-devel python26-distribute python26-boto python26-paramiko python26-crypto python26-markupsafe --enablerepo=epel sudo easy_install-2.6 pip sudo pip2.6 install ansible
[defaults] interpreter_python=/usr/bin/env python
[localhost:vars] ansible_python_interpreter="/usr/bin/env python"
tasks: vars: ansible_python_interpreter: "/usr/bin/env python" #ansible_python_interpreter: ~/.pyenv/shims/python # pyenvのみの場合 #ansible_python_interpreter: ~/.anyenv/envs/pyenv/shims/python # anyenv + pyenvの場合
moduleに不具合がある等でバージョンを戻したい時がある
pip install ansible==2.3.3
centos5-host ansible_python_interpreter=/usr/bin/python2.6
python -c "import yum" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named yum
sudo yum install yum-python26
sudo yum install -y python-simplejson
ansible -i hosts -m raw -a 'sudo yum -y install python-simplejson' all
sudo easy_install https://pypi.python.org/packages/source/s/simplejson/simplejson-2.1.6.tar.gz
python2.6で次の警告が出る。
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
sudo pip install requests==2.5.3
sudo pip install 'requests[security]'
sudo pip uninstall cryptography
sudo pip install stevedore==0.10
sudo yum info python27 python27-python-setuptools pip2.7 list
sudo pip install --upgrade setuptools
sudo pip uninstall pycrypto sudo pip install PyCrypto==2.3
ansible --version /usr/lib64/python2.6/site-packages/pycrypto-2.6.1-py2.6-linux-x86_64.egg/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability. _warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning) ansible 2.0.2.0
sudo yum update python-crypto2.6 --enablerepo=epel