カテゴリー「Ansible」の1件の記事

CentOS 7 に ansible をインストール : ansible

minimal インストールした CentOS 7.5.1804 に ansible をインストールする。先に epel リポジトリをインストールすると新しいバージョンの ansible をインストールできる。

《投入コマンド》

  • yum -y install epel-release
  • yum -y install ansible
  • ansible --version


《実行結果》

  • [root@ansiblesv ~]# yum -y install epel-release
  • Loaded plugins: fastestmirror
  • Determining fastest mirrors
  •  * base: ftp.nara.wide.ad.jp
  •  * extras: ftp.nara.wide.ad.jp
  •  * updates: ftp.nara.wide.ad.jp
  • base | 3.6 kB 00:00:00
  • extras | 3.4 kB 00:00:00
  • updates | 3.4 kB 00:00:00
  • (1/4): base/7/x86_64/group_gz | 166 kB 00:00:00
  • (2/4): extras/7/x86_64/primary_db | 205 kB 00:00:00
  • (3/4): updates/7/x86_64/primary_db | 6.0 MB 00:00:00
  • (4/4): base/7/x86_64/primary_db | 5.9 MB 00:00:01
  • Resolving Dependencies
  • --> Running transaction check
  • ---> Package epel-release.noarch 0:7-11 will be installed
  • --> Finished Dependency Resolution
  • Dependencies Resolved
  • ====================================================================================================
  •  Package Arch Version Repository Size
  • ====================================================================================================
  • Installing:
  •  epel-release noarch 7-11 extras 15 k
  • Transaction Summary
  • ====================================================================================================
  • Install 1 Package
  • Total download size: 15 k
  • Installed size: 24 k
  • Downloading packages:
  • warning: /var/cache/yum/x86_64/7/extras/packages/epel-release-7-11.noarch.rpm: Header V3 RSA/SHA256
  • Signature, key ID f4a80eb5: NOKEY
  • Public key for epel-release-7-11.noarch.rpm is not installed
  • epel-release-7-11.noarch.rpm | 15 kB 00:00:00
  • Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  • Importing GPG key 0xF4A80EB5:
  •  Userid : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
  •  Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
  •  Package : centos-release-7-5.1804.el7.centos.x86_64 (@anaconda)
  •  From : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
  • Running transaction check
  • Running transaction test
  • Transaction test succeeded
  • Running transaction
  •   Installing : epel-release-7-11.noarch 1/1
  •   Verifying : epel-release-7-11.noarch 1/1
  • Installed:
  •   epel-release.noarch 0:7-11
  • Complete!
  • [root@ansiblesv ~]# yum -y install ansible
  • Loaded plugins: fastestmirror
  • Loading mirror speeds from cached hostfile
  • epel/x86_64/metalink | 4.4 kB 00:00:00
  •  * base: ftp.nara.wide.ad.jp
  •  * epel: ftp.yz.yamagata-u.ac.jp
  •  * extras: ftp.nara.wide.ad.jp
  •  * updates: ftp.nara.wide.ad.jp
  • epel | 3.2 kB 00:00:00
  • (1/3): epel/x86_64/group_gz | 88 kB 00:00:00
  • (2/3): epel/x86_64/updateinfo | 931 kB 00:00:00
  • (3/3): epel/x86_64/primary | 3.6 MB 00:00:00
  • epel 12718/12718
  • Resolving Dependencies
  • --> Running transaction check
  • ---> Package ansible.noarch 0:2.7.2-1.el7 will be installed
  • --> Processing Dependency: sshpass for package: ansible-2.7.2-1.el7.noarch
  • --> Processing Dependency: python2-jmespath for package: ansible-2.7.2-1.el7.noarch
  • --> Processing Dependency: python-six for package: ansible-2.7.2-1.el7.noarch
  • --> Processing Dependency: python-setuptools for package: ansible-2.7.2-1.el7.noarch
  • --> Processing Dependency: python-paramiko for package: ansible-2.7.2-1.el7.noarch
  • --> Processing Dependency: python-keyczar for package: ansible-2.7.2-1.el7.noarch
  • --> Processing Dependency: python-jinja2 for package: ansible-2.7.2-1.el7.noarch
  • --> Processing Dependency: python-httplib2 for package: ansible-2.7.2-1.el7.noarch
  • --> Processing Dependency: python-crypto for package: ansible-2.7.2-1.el7.noarch
  • --> Processing Dependency: PyYAML for package: ansible-2.7.2-1.el7.noarch
  • --> Running transaction check
  • ---> Package PyYAML.x86_64 0:3.10-11.el7 will be installed
  • --> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-11.el7.x86_64
  • ---> Package python-httplib2.noarch 0:0.9.2-1.el7 will be installed
  • ---> Package python-jinja2.noarch 0:2.7.2-2.el7 will be installed
  • --> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.7.2-2.el7.noarch
  • --> Processing Dependency: python-markupsafe for package: python-jinja2-2.7.2-2.el7.noarch
  • ---> Package python-keyczar.noarch 0:0.71c-2.el7 will be installed
  • --> Processing Dependency: python-pyasn1 for package: python-keyczar-0.71c-2.el7.noarch
  • ---> Package python-paramiko.noarch 0:2.1.1-4.el7 will be installed
  • --> Processing Dependency: python-cryptography for package: python-paramiko-2.1.1-4.el7.noarch
  • ---> Package python-setuptools.noarch 0:0.9.8-7.el7 will be installed
  • --> Processing Dependency: python-backports-ssl_match_hostname for package: python-setuptools-0.9.8-7.el7.noarch
  • ---> Package python-six.noarch 0:1.9.0-2.el7 will be installed
  • ---> Package python2-crypto.x86_64 0:2.6.1-15.el7 will be installed
  • --> Processing Dependency: libtomcrypt.so.0()(64bit) for package: python2-crypto-2.6.1-15.el7.x86_64
  • ---> Package python2-jmespath.noarch 0:0.9.0-3.el7 will be installed
  • ---> Package sshpass.x86_64 0:1.06-2.el7 will be installed
  • --> Running transaction check
  • ---> Package libtomcrypt.x86_64 0:1.17-26.el7 will be installed
  • --> Processing Dependency: libtommath >= 0.42.0 for package: libtomcrypt-1.17-26.el7.x86_64
  • --> Processing Dependency: libtommath.so.0()(64bit) for package: libtomcrypt-1.17-26.el7.x86_64
  • ---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed
  • ---> Package python-babel.noarch 0:0.9.6-8.el7 will be installed
  • ---> Package python-backports-ssl_match_hostname.noarch 0:3.5.0.1-1.el7 will be installed
  • --> Processing Dependency: python-ipaddress for package: python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch
  • --> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch
  • ---> Package python-markupsafe.x86_64 0:0.11-10.el7 will be installed
  • ---> Package python2-cryptography.x86_64 0:1.7.2-2.el7 will be installed
  • --> Processing Dependency: python-idna >= 2.0 for package: python2-cryptography-1.7.2-2.el7.x86_64
  • --> Processing Dependency: python-cffi >= 1.4.1 for package: python2-cryptography-1.7.2-2.el7.x86_64
  • --> Processing Dependency: python-enum34 for package: python2-cryptography-1.7.2-2.el7.x86_64
  • ---> Package python2-pyasn1.noarch 0:0.1.9-7.el7 will be installed
  • --> Running transaction check
  • ---> Package libtommath.x86_64 0:0.42.0-6.el7 will be installed
  • ---> Package python-backports.x86_64 0:1.0-8.el7 will be installed
  • ---> Package python-cffi.x86_64 0:1.6.0-5.el7 will be installed
  • --> Processing Dependency: python-pycparser for package: python-cffi-1.6.0-5.el7.x86_64
  • ---> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
  • ---> Package python-idna.noarch 0:2.4-1.el7 will be installed
  • ---> Package python-ipaddress.noarch 0:1.0.16-2.el7 will be installed
  • --> Running transaction check
  • ---> Package python-pycparser.noarch 0:2.14-1.el7 will be installed
  • --> Processing Dependency: python-ply for package: python-pycparser-2.14-1.el7.noarch
  • --> Running transaction check
  • ---> Package python-ply.noarch 0:3.4-11.el7 will be installed
  • --> Finished Dependency Resolution
  • Dependencies Resolved
  • ====================================================================================================
  •  Package Arch Version Repository Size
  • ====================================================================================================
  • Installing:
  •  ansible noarch 2.7.2-1.el7 epel 11 M
  • Installing for dependencies:
  •  PyYAML x86_64 3.10-11.el7 base 153 k
  •  libtomcrypt x86_64 1.17-26.el7 extras 224 k
  •  libtommath x86_64 0.42.0-6.el7 extras 36 k
  •  libyaml x86_64 0.1.4-11.el7_0 base 55 k
  •  python-babel noarch 0.9.6-8.el7 base 1.4 M
  •  python-backports x86_64 1.0-8.el7 base 5.8 k
  •  python-backports-ssl_match_hostname noarch 3.5.0.1-1.el7 base 13 k
  •  python-cffi x86_64 1.6.0-5.el7 base 218 k
  •  python-enum34 noarch 1.0.4-1.el7 base 52 k
  •  python-httplib2 noarch 0.9.2-1.el7 extras 115 k
  •  python-idna noarch 2.4-1.el7 base 94 k
  •  python-ipaddress noarch 1.0.16-2.el7 base 34 k
  •  python-jinja2 noarch 2.7.2-2.el7 base 515 k
  •  python-keyczar noarch 0.71c-2.el7 epel 218 k
  •  python-markupsafe x86_64 0.11-10.el7 base 25 k
  •  python-paramiko noarch 2.1.1-4.el7 extras 268 k
  •  python-ply noarch 3.4-11.el7 base 123 k
  •  python-pycparser noarch 2.14-1.el7 base 104 k
  •  python-setuptools noarch 0.9.8-7.el7 base 397 k
  •  python-six noarch 1.9.0-2.el7 base 29 k
  •  python2-crypto x86_64 2.6.1-15.el7 extras 477 k
  •  python2-cryptography x86_64 1.7.2-2.el7 base 502 k
  •  python2-jmespath noarch 0.9.0-3.el7 extras 39 k
  •  python2-pyasn1 noarch 0.1.9-7.el7 base 100 k
  •  sshpass x86_64 1.06-2.el7 extras 21 k
  • Transaction Summary
  • ====================================================================================================
  • Install 1 Package (+25 Dependent packages)
  • Total download size: 16 M
  • Installed size: 82 M
  • Downloading packages:
  • (1/26): PyYAML-3.10-11.el7.x86_64.rpm | 153 kB 00:00:00
  • (2/26): libyaml-0.1.4-11.el7_0.x86_64.rpm | 55 kB 00:00:00
  • (3/26): libtommath-0.42.0-6.el7.x86_64.rpm | 36 kB 00:00:00
  • (4/26): python-backports-1.0-8.el7.x86_64.rpm | 5.8 kB 00:00:00
  • (5/26): python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch.rpm | 13 kB 00:00:00
  • (6/26): libtomcrypt-1.17-26.el7.x86_64.rpm | 224 kB 00:00:00
  • (7/26): python-enum34-1.0.4-1.el7.noarch.rpm | 52 kB 00:00:00
  • (8/26): python-httplib2-0.9.2-1.el7.noarch.rpm | 115 kB 00:00:00
  • (9/26): python-ipaddress-1.0.16-2.el7.noarch.rpm | 34 kB 00:00:00
  • (10/26): python-babel-0.9.6-8.el7.noarch.rpm | 1.4 MB 00:00:00
  • (11/26): python-idna-2.4-1.el7.noarch.rpm | 94 kB 00:00:00
  • (12/26): python-cffi-1.6.0-5.el7.x86_64.rpm | 218 kB 00:00:00
  • (13/26): python-jinja2-2.7.2-2.el7.noarch.rpm | 515 kB 00:00:00
  • warning: /var/cache/yum/x86_64/7/epel/packages/ansible-2.7.2-1.el7.noarch.rpm: Header V3 RSA/SHA256
  • Signature, key ID 352c64e5: NOKEY
  • Public key for ansible-2.7.2-1.el7.noarch.rpm is not installed
  • (14/26): ansible-2.7.2-1.el7.noarch.rpm | 11 MB 00:00:01
  • (15/26): python-keyczar-0.71c-2.el7.noarch.rpm | 218 kB 00:00:00
  • (16/26): python-markupsafe-0.11-10.el7.x86_64.rpm | 25 kB 00:00:00
  • (17/26): python-pycparser-2.14-1.el7.noarch.rpm | 104 kB 00:00:00
  • (18/26): python-six-1.9.0-2.el7.noarch.rpm | 29 kB 00:00:00
  • (19/26): python2-cryptography-1.7.2-2.el7.x86_64.rpm | 502 kB 00:00:00
  • (20/26): python2-crypto-2.6.1-15.el7.x86_64.rpm | 477 kB 00:00:00
  • (21/26): python2-jmespath-0.9.0-3.el7.noarch.rpm | 39 kB 00:00:00
  • (22/26): sshpass-1.06-2.el7.x86_64.rpm | 21 kB 00:00:00
  • (23/26): python-paramiko-2.1.1-4.el7.noarch.rpm | 268 kB 00:00:00
  • (24/26): python-ply-3.4-11.el7.noarch.rpm | 123 kB 00:00:00
  • (25/26): python2-pyasn1-0.1.9-7.el7.noarch.rpm | 100 kB 00:00:00
  • (26/26): python-setuptools-0.9.8-7.el7.noarch.rpm | 397 kB 00:00:00
  • ----------------------------------------------------------------------------------------------------
  • Total 6.1 MB/s | 16 MB 00:00:02
  • Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
  • Importing GPG key 0x352C64E5:
  •  Userid : "Fedora EPEL (7) <epel@fedoraproject.org>"
  •  Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
  •  Package : epel-release-7-11.noarch (@extras)
  •  From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
  • Running transaction check
  • Running transaction test
  • Transaction test succeeded
  • Running transaction
  •   Installing : python2-pyasn1-0.1.9-7.el7.noarch 1/26
  •   Installing : python-ipaddress-1.0.16-2.el7.noarch 2/26
  •   Installing : python-six-1.9.0-2.el7.noarch 3/26
  •   Installing : python-httplib2-0.9.2-1.el7.noarch 4/26
  •   Installing : python-enum34-1.0.4-1.el7.noarch 5/26
  •   Installing : libyaml-0.1.4-11.el7_0.x86_64 6/26
  •   Installing : PyYAML-3.10-11.el7.x86_64 7/26
  •   Installing : libtommath-0.42.0-6.el7.x86_64 8/26
  •   Installing : libtomcrypt-1.17-26.el7.x86_64 9/26
  •   Installing : python2-crypto-2.6.1-15.el7.x86_64 10/26
  •   Installing : python-keyczar-0.71c-2.el7.noarch 11/26
  •   Installing : python-backports-1.0-8.el7.x86_64 12/26
  •   Installing : python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch 13/26
  •   Installing : python-setuptools-0.9.8-7.el7.noarch 14/26
  •   Installing : python-babel-0.9.6-8.el7.noarch 15/26
  •   Installing : python-ply-3.4-11.el7.noarch 16/26
  •   Installing : python-pycparser-2.14-1.el7.noarch 17/26
  •   Installing : python-cffi-1.6.0-5.el7.x86_64 18/26
  •   Installing : python-markupsafe-0.11-10.el7.x86_64 19/26
  •   Installing : python-jinja2-2.7.2-2.el7.noarch 20/26
  •   Installing : python-idna-2.4-1.el7.noarch 21/26
  •   Installing : python2-cryptography-1.7.2-2.el7.x86_64 22/26
  •   Installing : python-paramiko-2.1.1-4.el7.noarch 23/26
  •   Installing : sshpass-1.06-2.el7.x86_64 24/26
  •   Installing : python2-jmespath-0.9.0-3.el7.noarch 25/26
  •   Installing : ansible-2.7.2-1.el7.noarch 26/26
  •   Verifying : python-keyczar-0.71c-2.el7.noarch 1/26
  •   Verifying : python-jinja2-2.7.2-2.el7.noarch 2/26
  •   Verifying : python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch 3/26
  •   Verifying : python2-jmespath-0.9.0-3.el7.noarch 4/26
  •   Verifying : sshpass-1.06-2.el7.x86_64 5/26
  •   Verifying : python2-cryptography-1.7.2-2.el7.x86_64 6/26
  •   Verifying : python-setuptools-0.9.8-7.el7.noarch 7/26
  •   Verifying : python-six-1.9.0-2.el7.noarch 8/26
  •   Verifying : python-idna-2.4-1.el7.noarch 9/26
  •   Verifying : python-markupsafe-0.11-10.el7.x86_64 10/26
  •   Verifying : python-ply-3.4-11.el7.noarch 11/26
  •   Verifying : python-babel-0.9.6-8.el7.noarch 12/26
  •   Verifying : python-paramiko-2.1.1-4.el7.noarch 13/26
  •   Verifying : python-backports-1.0-8.el7.x86_64 14/26
  •   Verifying : python-cffi-1.6.0-5.el7.x86_64 15/26
  •   Verifying : libtommath-0.42.0-6.el7.x86_64 16/26
  •   Verifying : python-pycparser-2.14-1.el7.noarch 17/26
  •   Verifying : libyaml-0.1.4-11.el7_0.x86_64 18/26
  •   Verifying : python2-crypto-2.6.1-15.el7.x86_64 19/26
  •   Verifying : python-ipaddress-1.0.16-2.el7.noarch 20/26
  •   Verifying : python-enum34-1.0.4-1.el7.noarch 21/26
  •   Verifying : python-httplib2-0.9.2-1.el7.noarch 22/26
  •   Verifying : python2-pyasn1-0.1.9-7.el7.noarch 23/26
  •   Verifying : ansible-2.7.2-1.el7.noarch 24/26
  •   Verifying : PyYAML-3.10-11.el7.x86_64 25/26
  •   Verifying : libtomcrypt-1.17-26.el7.x86_64 26/26
  • Installed:
  •   ansible.noarch 0:2.7.2-1.el7
  • Dependency Installed:
  •   PyYAML.x86_64 0:3.10-11.el7
  •   libtomcrypt.x86_64 0:1.17-26.el7
  •   libtommath.x86_64 0:0.42.0-6.el7
  •   libyaml.x86_64 0:0.1.4-11.el7_0
  •   python-babel.noarch 0:0.9.6-8.el7
  •   python-backports.x86_64 0:1.0-8.el7
  •   python-backports-ssl_match_hostname.noarch 0:3.5.0.1-1.el7
  •   python-cffi.x86_64 0:1.6.0-5.el7
  •   python-enum34.noarch 0:1.0.4-1.el7
  •   python-httplib2.noarch 0:0.9.2-1.el7
  •   python-idna.noarch 0:2.4-1.el7
  •   python-ipaddress.noarch 0:1.0.16-2.el7
  •   python-jinja2.noarch 0:2.7.2-2.el7
  •   python-keyczar.noarch 0:0.71c-2.el7
  •   python-markupsafe.x86_64 0:0.11-10.el7
  •   python-paramiko.noarch 0:2.1.1-4.el7
  •   python-ply.noarch 0:3.4-11.el7
  •   python-pycparser.noarch 0:2.14-1.el7
  •   python-setuptools.noarch 0:0.9.8-7.el7
  •   python-six.noarch 0:1.9.0-2.el7
  •   python2-crypto.x86_64 0:2.6.1-15.el7
  •   python2-cryptography.x86_64 0:1.7.2-2.el7
  •   python2-jmespath.noarch 0:0.9.0-3.el7
  •   python2-pyasn1.noarch 0:0.1.9-7.el7
  •   sshpass.x86_64 0:1.06-2.el7
  • Complete!
  • [root@ansiblesv ~]# ansible --version
  • ansible 2.7.2
  •   config file = /etc/ansible/ansible.cfg
  •   configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  •   ansible python module location = /usr/lib/python2.7/site-packages/ansible
  •   executable location = /usr/bin/ansible
  •   python version = 2.7.5 (default, Apr 11 2018, 07:36:10) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
  • [root@ansiblesv ~]#

続きを読む "CentOS 7 に ansible をインストール : ansible"