Opensourcetechブログ

OpensourcetechによるLinux・オープンソース・IT技術などに関するブログです。

Ansible で latest development version へアップグレードする方法(pip)

 

 

こんにちは、LinuCエバンジェリストこと、鯨井貴博@opensourcetechです。

 

Ansible2.8 が現在 開発ステータスにあるのですが、

通常のpipによるアップグレードでは、以下の操作のようにstable の最新にしかできません。

Ansible 2.8 Porting Guide — Ansible Documentation

 

pipによるstable 最新バージョンへのアップグレード

XYZ:~ SubMattNesk$ pip list | grep ansible
ansible 2.6.3
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
XYZ:~ SubMattNesk$ pip install --upgrade ansible
Requirement already up-to-date: ansible in ./anaconda3/lib/python3.6/site-packages (2.6.3)
Requirement not upgraded as not directly required: PyYAML in ./anaconda3/lib/python3.6/site-packages (from ansible) (3.12)
Requirement not upgraded as not directly required: jinja2 in ./anaconda3/lib/python3.6/site-packages (from ansible) (2.10)
Requirement not upgraded as not directly required: cryptography in ./anaconda3/lib/python3.6/site-packages (from ansible) (2.2.2)
Requirement not upgraded as not directly required: setuptools in ./anaconda3/lib/python3.6/site-packages (from ansible) (39.1.0)
Requirement not upgraded as not directly required: paramiko in ./anaconda3/lib/python3.6/site-packages (from ansible) (2.4.1)
Requirement not upgraded as not directly required: MarkupSafe>=0.23 in ./anaconda3/lib/python3.6/site-packages (from jinja2->ansible) (1.0)
Requirement not upgraded as not directly required: idna>=2.1 in ./anaconda3/lib/python3.6/site-packages (from cryptography->ansible) (2.6)
Requirement not upgraded as not directly required: asn1crypto>=0.21.0 in ./anaconda3/lib/python3.6/site-packages (from cryptography->ansible) (0.24.0)
Requirement not upgraded as not directly required: six>=1.4.1 in ./anaconda3/lib/python3.6/site-packages (from cryptography->ansible) (1.11.0)
Requirement not upgraded as not directly required: cffi>=1.7 in ./anaconda3/lib/python3.6/site-packages (from cryptography->ansible) (1.11.5)
Requirement not upgraded as not directly required: pynacl>=1.0.1 in ./anaconda3/lib/python3.6/site-packages (from paramiko->ansible) (1.2.1)
Requirement not upgraded as not directly required: bcrypt>=3.1.3 in ./anaconda3/lib/python3.6/site-packages (from paramiko->ansible) (3.1.4)
Requirement not upgraded as not directly required: pyasn1>=0.1.7 in ./anaconda3/lib/python3.6/site-packages (from paramiko->ansible) (0.4.4)
Requirement not upgraded as not directly required: pycparser in ./anaconda3/lib/python3.6/site-packages (from cffi>=1.7->cryptography->ansible) (2.18)
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

 

 

pipによるdevelopment 最新バージョンへのアップグレード

以下のURLに記載されている Gitからインストールする方法を使えば、

development latest versionが使えます。

f:id:opensourcetech:20180909093221p:plain

https://docs.ansible.com/ansible/devel/installation_guide/intro_installation.html#latest-releases-via-pip

 

XYZ:~ SubMattNesk$ pip install git+https://github.com/ansible/ansible.git@devel
Collecting git+https://github.com/ansible/ansible.git@devel
Cloning https://github.com/ansible/ansible.git (to revision devel) to /private/var/folders/t1/tqdqkp7j4bdcwb7q12qf35y00000gn/T/pip-req-build-onldwzqc
Requirement already satisfied: jinja2 in ./anaconda3/lib/python3.6/site-packages (from ansible==2.8.0.dev0) (2.10)
Requirement already satisfied: PyYAML in ./anaconda3/lib/python3.6/site-packages (from ansible==2.8.0.dev0) (3.12)
Requirement already satisfied: paramiko in ./anaconda3/lib/python3.6/site-packages (from ansible==2.8.0.dev0) (2.4.1)
Requirement already satisfied: cryptography in ./anaconda3/lib/python3.6/site-packages (from ansible==2.8.0.dev0) (2.2.2)
Requirement already satisfied: setuptools in ./anaconda3/lib/python3.6/site-packages (from ansible==2.8.0.dev0) (39.1.0)
Requirement already satisfied: MarkupSafe>=0.23 in ./anaconda3/lib/python3.6/site-packages (from jinja2->ansible==2.8.0.dev0) (1.0)
Requirement already satisfied: bcrypt>=3.1.3 in ./anaconda3/lib/python3.6/site-packages (from paramiko->ansible==2.8.0.dev0) (3.1.4)
Requirement already satisfied: pynacl>=1.0.1 in ./anaconda3/lib/python3.6/site-packages (from paramiko->ansible==2.8.0.dev0) (1.2.1)
Requirement already satisfied: pyasn1>=0.1.7 in ./anaconda3/lib/python3.6/site-packages (from paramiko->ansible==2.8.0.dev0) (0.4.4)
Requirement already satisfied: idna>=2.1 in ./anaconda3/lib/python3.6/site-packages (from cryptography->ansible==2.8.0.dev0) (2.6)
Requirement already satisfied: asn1crypto>=0.21.0 in ./anaconda3/lib/python3.6/site-packages (from cryptography->ansible==2.8.0.dev0) (0.24.0)
Requirement already satisfied: six>=1.4.1 in ./anaconda3/lib/python3.6/site-packages (from cryptography->ansible==2.8.0.dev0) (1.11.0)
Requirement already satisfied: cffi>=1.7 in ./anaconda3/lib/python3.6/site-packages (from cryptography->ansible==2.8.0.dev0) (1.11.5)
Requirement already satisfied: pycparser in ./anaconda3/lib/python3.6/site-packages (from cffi>=1.7->cryptography->ansible==2.8.0.dev0) (2.18)
Building wheels for collected packages: ansible
Running setup.py bdist_wheel for ansible ... done
Stored in directory: /private/var/folders/t1/tqdqkp7j4bdcwb7q12qf35y00000gn/T/pip-ephem-wheel-cache-73te2lsy/wheels/fb/da/b5/841eb5c0b9fbc9c4dd4141d0aa5e9206890a2bded63eafed42
Successfully built ansible
Installing collected packages: ansible
Found existing installation: ansible 2.6.3
Uninstalling ansible-2.6.3:
Successfully uninstalled ansible-2.6.3
Successfully installed ansible-2.8.0.dev0
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
XYZ:~ SubMattNesk$ pip list | grep ansible
ansible 2.8.0.dev0
You are using pip version 10.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
XYZ:~ SubMattNesk$ ansible --version
ansible 2.8.0.dev0
config file = /Users/SubMattNesk/.ansible.cfg
configured module search path = ['/Users/SubMattNesk/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /Users/SubMattNesk/anaconda3/lib/python3.6/site-packages/ansible
executable location = /Users/SubMattNesk/anaconda3/bin/ansible
python version = 3.6.5 |Anaconda, Inc.| (default, Apr 26 2018, 08:42:37) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]

 

 

 

www.slideshare.net

github.com

www.facebook.com

twitter.com

www.instagram.com

 

 

にほんブログ村 IT技術ブログ Linuxへ
Linux

にほんブログ村 IT技術ブログ オープンソースへ
オープンソース

 

 

Opensourcetech by Takahiro Kujirai