ansibleを使ってみよう。
EPELの準備
[root@localhost ~]# rpm -ivh epel-release-6-8.noarch.rpm 警告: epel-release-6-8.noarch.rpm: ヘッダ V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY 準備中... ########################################### [100%] パッケージ epel-release-6-8.noarch は既にインストールされています。 [root@localhost ~]#
インストール
[root@localhost ~]# yum install ansible Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile epel/metalink | 5.3 kB 00:00 * base: www.ftp.ne.jp * epel: ftp.riken.jp * extras: www.ftp.ne.jp * updates: www.ftp.ne.jp base | 3.7 kB 00:00 epel | 4.4 kB 00:00 epel/primary_db | 6.3 MB 00:00 extras | 3.4 kB 00:00 updates | 3.4 kB 00:00 Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package ansible.noarch 0:1.8.1-1.el6 will be installed --> Processing Dependency: python-setuptools for package: ansible-1.8.1-1.el6.noarch --> Processing Dependency: python-paramiko for package: ansible-1.8.1-1.el6.noarch --> Processing Dependency: python-keyczar for package: ansible-1.8.1-1.el6.noarch --> Processing Dependency: python-jinja2 for package: ansible-1.8.1-1.el6.noarch --> Processing Dependency: python-httplib2 for package: ansible-1.8.1-1.el6.noarch --> Processing Dependency: python-crypto2.6 for package: ansible-1.8.1-1.el6.noarch --> Processing Dependency: PyYAML for package: ansible-1.8.1-1.el6.noarch --> Running transaction check ---> Package PyYAML.x86_64 0:3.10-3.1.el6 will be installed --> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-3.1.el6.x86_64 ---> Package python-crypto2.6.x86_64 0:2.6.1-1.el6 will be installed ---> Package python-httplib2.noarch 0:0.7.7-1.el6 will be installed ---> Package python-jinja2.x86_64 0:2.2.1-2.el6_5 will be installed --> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.2.1-2.el6_5.x86_64 ---> Package python-keyczar.noarch 0:0.71c-1.el6 will be installed --> Processing Dependency: python-pyasn1 for package: python-keyczar-0.71c-1.el6.noarch --> Processing Dependency: python-crypto for package: python-keyczar-0.71c-1.el6.noarch ---> Package python-paramiko.noarch 0:1.7.5-2.1.el6 will be installed ---> Package python-setuptools.noarch 0:0.6.10-3.el6 will be installed --> Running transaction check ---> Package libyaml.x86_64 0:0.1.3-1.4.el6 will be installed ---> Package python-babel.noarch 0:0.9.4-5.1.el6 will be installed ---> Package python-crypto.x86_64 0:2.0.1-22.el6 will be installed ---> Package python-pyasn1.noarch 0:0.0.12a-1.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================== Package Arch Version Repository Size ======================================================================================================================== Installing: ansible noarch 1.8.1-1.el6 epel 1.5 M Installing for dependencies: PyYAML x86_64 3.10-3.1.el6 updates 157 k libyaml x86_64 0.1.3-1.4.el6 base 52 k python-babel noarch 0.9.4-5.1.el6 base 1.4 M python-crypto x86_64 2.0.1-22.el6 base 159 k python-crypto2.6 x86_64 2.6.1-1.el6 epel 530 k python-httplib2 noarch 0.7.7-1.el6 epel 70 k python-jinja2 x86_64 2.2.1-2.el6_5 base 466 k python-keyczar noarch 0.71c-1.el6 epel 219 k python-paramiko noarch 1.7.5-2.1.el6 base 728 k python-pyasn1 noarch 0.0.12a-1.el6 base 70 k python-setuptools noarch 0.6.10-3.el6 base 336 k Transaction Summary ======================================================================================================================== Install 12 Package(s) Total download size: 5.6 M Installed size: 27 M Is this ok [y/N]: y Downloading Packages: (1/12): PyYAML-3.10-3.1.el6.x86_64.rpm | 157 kB 00:00 (2/12): ansible-1.8.1-1.el6.noarch.rpm | 1.5 MB 00:00 (3/12): libyaml-0.1.3-1.4.el6.x86_64.rpm | 52 kB 00:00 (4/12): python-babel-0.9.4-5.1.el6.noarch.rpm | 1.4 MB 00:00 (5/12): python-crypto-2.0.1-22.el6.x86_64.rpm | 159 kB 00:00 (6/12): python-crypto2.6-2.6.1-1.el6.x86_64.rpm | 530 kB 00:00 (7/12): python-httplib2-0.7.7-1.el6.noarch.rpm | 70 kB 00:00 (8/12): python-jinja2-2.2.1-2.el6_5.x86_64.rpm | 466 kB 00:00 (9/12): python-keyczar-0.71c-1.el6.noarch.rpm | 219 kB 00:00 (10/12): python-paramiko-1.7.5-2.1.el6.noarch.rpm | 728 kB 00:00 (11/12): python-pyasn1-0.0.12a-1.el6.noarch.rpm | 70 kB 00:00 (12/12): python-setuptools-0.6.10-3.el6.noarch.rpm | 336 kB 00:00 ------------------------------------------------------------------------------------------------------------------------ Total 3.7 MB/s | 5.6 MB 00:01 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 Importing GPG key 0x0608B895: Userid : EPEL (6) <epel@fedoraproject.org> Package: epel-release-6-8.noarch (installed) From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Warning: RPMDB altered outside of yum. Installing : python-crypto-2.0.1-22.el6.x86_64 1/12 Installing : python-paramiko-1.7.5-2.1.el6.noarch 2/12 Installing : python-setuptools-0.6.10-3.el6.noarch 3/12 Installing : python-pyasn1-0.0.12a-1.el6.noarch 4/12 Installing : python-keyczar-0.71c-1.el6.noarch 5/12 Installing : python-crypto2.6-2.6.1-1.el6.x86_64 6/12 Installing : python-httplib2-0.7.7-1.el6.noarch 7/12 Installing : python-babel-0.9.4-5.1.el6.noarch 8/12 Installing : python-jinja2-2.2.1-2.el6_5.x86_64 9/12 Installing : libyaml-0.1.3-1.4.el6.x86_64 10/12 Installing : PyYAML-3.10-3.1.el6.x86_64 11/12 Installing : ansible-1.8.1-1.el6.noarch 12/12 Verifying : libyaml-0.1.3-1.4.el6.x86_64 1/12 Verifying : PyYAML-3.10-3.1.el6.x86_64 2/12 Verifying : python-babel-0.9.4-5.1.el6.noarch 3/12 Verifying : python-keyczar-0.71c-1.el6.noarch 4/12 Verifying : python-httplib2-0.7.7-1.el6.noarch 5/12 Verifying : ansible-1.8.1-1.el6.noarch 6/12 Verifying : python-jinja2-2.2.1-2.el6_5.x86_64 7/12 Verifying : python-crypto-2.0.1-22.el6.x86_64 8/12 Verifying : python-crypto2.6-2.6.1-1.el6.x86_64 9/12 Verifying : python-pyasn1-0.0.12a-1.el6.noarch 10/12 Verifying : python-paramiko-1.7.5-2.1.el6.noarch 11/12 Verifying : python-setuptools-0.6.10-3.el6.noarch 12/12 Installed: ansible.noarch 0:1.8.1-1.el6 Dependency Installed: PyYAML.x86_64 0:3.10-3.1.el6 libyaml.x86_64 0:0.1.3-1.4.el6 python-babel.noarch 0:0.9.4-5.1.el6 python-crypto.x86_64 0:2.0.1-22.el6 python-crypto2.6.x86_64 0:2.6.1-1.el6 python-httplib2.noarch 0:0.7.7-1.el6 python-jinja2.x86_64 0:2.2.1-2.el6_5 python-keyczar.noarch 0:0.71c-1.el6 python-paramiko.noarch 0:1.7.5-2.1.el6 python-pyasn1.noarch 0:0.0.12a-1.el6 python-setuptools.noarch 0:0.6.10-3.el6 Complete! [root@localhost ~]#