How to install Ansible 1.9.4 in CentOS 6.5


Follow the following steps for installing the ansible 1.9.4 in centos6.5:

Video:



Logging with root user in Centos6.5 and perform bellow command:





[root@vagrant-centos65 vagrant]# yum install ansible
Loaded plugins: fastestmirror, versionlock
Determining fastest mirrors
epel/metalink | 22 kB 00:00
* base: anorien.csc.warwick.ac.uk
* epel: epel.besthosting.ua
* extras: centos.serverspace.co.uk
* updates: anorien.csc.warwick.ac.uk
base | 3.7 kB 00:00
base/primary_db | 4.6 MB 00:03
epel | 4.3 kB 00:00
epel/primary_db | 5.8 MB 00:21
extras | 3.4 kB 00:00
extras/primary_db | 34 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.3 MB 00:03
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ansible.noarch 0:1.9.4-1.el6 will be installed
--> Processing Dependency: sshpass for package: ansible-1.9.4-1.el6.noarch
--> Processing Dependency: python-simplejson for package: ansible-1.9.4-1.el6.noarch
--> Processing Dependency: python-setuptools for package: ansible-1.9.4-1.el6.noarch
--> Processing Dependency: python-keyczar for package: ansible-1.9.4-1.el6.noarch
--> Processing Dependency: python-jinja2 for package: ansible-1.9.4-1.el6.noarch
--> Processing Dependency: python-httplib2 for package: ansible-1.9.4-1.el6.noarch
--> Processing Dependency: python-crypto2.6 for package: ansible-1.9.4-1.el6.noarch
--> Processing Dependency: PyYAML for package: ansible-1.9.4-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-2.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
---> Package python-setuptools.noarch 0:0.6.10-3.el6 will be installed
---> Package python-simplejson.x86_64 0:2.0.9-3.1.el6 will be installed
---> Package sshpass.x86_64 0:1.05-1.el6 will be installed
--> Running transaction check
---> Package libyaml.x86_64 0:0.1.3-4.el6_6 will be installed
---> Package python-babel.noarch 0:0.9.4-5.1.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.9.4-1.el6 epel 1.7 M
Installing for dependencies:
PyYAML x86_64 3.10-3.1.el6 base 157 k
libyaml x86_64 0.1.3-4.el6_6 base 52 k
python-babel noarch 0.9.4-5.1.el6 base 1.4 M
python-crypto2.6 x86_64 2.6.1-2.el6 epel 513 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-pyasn1 noarch 0.0.12a-1.el6 base 70 k
python-setuptools noarch 0.6.10-3.el6 base 336 k
python-simplejson x86_64 2.0.9-3.1.el6 base 126 k
sshpass x86_64 1.05-1.el6 epel 19 k

Transaction Summary
===============================================================================================================================================================================================
Install 12 Package(s)

Total download size: 5.1 M
Installed size: 20 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.9.4-1.el6.noarch.rpm | 1.7 MB 00:06
(3/12): libyaml-0.1.3-4.el6_6.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-crypto2.6-2.6.1-2.el6.x86_64.rpm | 513 kB 00:01
(6/12): python-httplib2-0.7.7-1.el6.noarch.rpm | 70 kB 00:00
(7/12): python-jinja2-2.2.1-2.el6_5.x86_64.rpm | 466 kB 00:00
(8/12): python-keyczar-0.71c-1.el6.noarch.rpm | 219 kB 00:01
(9/12): python-pyasn1-0.0.12a-1.el6.noarch.rpm | 70 kB 00:00
(10/12): python-setuptools-0.6.10-3.el6.noarch.rpm | 336 kB 00:00
(11/12): python-simplejson-2.0.9-3.1.el6.x86_64.rpm | 126 kB 00:00
(12/12): sshpass-1.05-1.el6.x86_64.rpm | 19 kB 00:00
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 381 kB/s | 5.1 MB 00:13
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : sshpass-1.05-1.el6.x86_64 1/12
Installing : python-setuptools-0.6.10-3.el6.noarch 2/12
Installing : python-crypto2.6-2.6.1-2.el6.x86_64 3/12
Installing : python-simplejson-2.0.9-3.1.el6.x86_64 4/12
Installing : python-httplib2-0.7.7-1.el6.noarch 5/12
Installing : python-pyasn1-0.0.12a-1.el6.noarch 6/12
Installing : python-keyczar-0.71c-1.el6.noarch 7/12
Installing : libyaml-0.1.3-4.el6_6.x86_64 8/12
Installing : PyYAML-3.10-3.1.el6.x86_64 9/12
Installing : python-babel-0.9.4-5.1.el6.noarch 10/12
Installing : python-jinja2-2.2.1-2.el6_5.x86_64 11/12
Installing : ansible-1.9.4-1.el6.noarch 12/12
Verifying : PyYAML-3.10-3.1.el6.x86_64 1/12
Verifying : python-babel-0.9.4-5.1.el6.noarch 2/12
Verifying : python-keyczar-0.71c-1.el6.noarch 3/12
Verifying : libyaml-0.1.3-4.el6_6.x86_64 4/12
Verifying : python-pyasn1-0.0.12a-1.el6.noarch 5/12
Verifying : python-httplib2-0.7.7-1.el6.noarch 6/12
Verifying : python-simplejson-2.0.9-3.1.el6.x86_64 7/12
Verifying : ansible-1.9.4-1.el6.noarch 8/12
Verifying : python-jinja2-2.2.1-2.el6_5.x86_64 9/12
Verifying : python-crypto2.6-2.6.1-2.el6.x86_64 10/12
Verifying : python-setuptools-0.6.10-3.el6.noarch 11/12
Verifying : sshpass-1.05-1.el6.x86_64 12/12

Installed:
ansible.noarch 0:1.9.4-1.el6

Dependency Installed:
PyYAML.x86_64 0:3.10-3.1.el6 libyaml.x86_64 0:0.1.3-4.el6_6 python-babel.noarch 0:0.9.4-5.1.el6 python-crypto2.6.x86_64 0:2.6.1-2.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-pyasn1.noarch 0:0.0.12a-1.el6
python-setuptools.noarch 0:0.6.10-3.el6 python-simplejson.x86_64 0:2.0.9-3.1.el6 sshpass.x86_64 0:1.05-1.el6

Complete!
[root@vagrant-centos65 vagrant]#

Verify the Ansible current version:

[root@vagrant-centos65 vagrant]# ansible --version
ansible 1.9.4
configured module search path = None
[root@vagrant-centos65 vagrant]# ansible
Usage: ansible [options]

Options:
-a MODULE_ARGS, --args=MODULE_ARGS
module arguments
--ask-become-pass ask for privilege escalation password
-k, --ask-pass ask for SSH password
--ask-su-pass ask for su password (deprecated, use become)
-K, --ask-sudo-pass ask for sudo password (deprecated, use become)
--ask-vault-pass ask for vault password
-B SECONDS, --background=SECONDS
run asynchronously, failing after X seconds
(default=N/A)
-b, --become run operations with become (nopasswd implied)
--become-method=BECOME_METHOD
privilege escalation method to use (default=sudo),
valid choices: [ sudo | su | pbrun | pfexec | runas ]
--become-user=BECOME_USER
run operations as this user (default=None)
-C, --check don't make any changes; instead, try to predict some
of the changes that may occur
-c CONNECTION, --connection=CONNECTION
connection type to use (default=smart)
-e EXTRA_VARS, --extra-vars=EXTRA_VARS
set additional variables as key=value or YAML/JSON
-f FORKS, --forks=FORKS
specify number of parallel processes to use
(default=5)
-h, --help show this help message and exit
-i INVENTORY, --inventory-file=INVENTORY
specify inventory host file
(default=/etc/ansible/hosts)
-l SUBSET, --limit=SUBSET
further limit selected hosts to an additional pattern
--list-hosts outputs a list of matching hosts; does not execute
anything else
-m MODULE_NAME, --module-name=MODULE_NAME
module name to execute (default=command)
-M MODULE_PATH, --module-path=MODULE_PATH
specify path(s) to module library (default=None)
-o, --one-line condense output
-P POLL_INTERVAL, --poll=POLL_INTERVAL
set the poll interval if using -B (default=15)
--private-key=PRIVATE_KEY_FILE
use this file to authenticate the connection
-S, --su run operations with su (deprecated, use become)
-R SU_USER, --su-user=SU_USER
run operations with su as this user (default=root)
(deprecated, use become)
-s, --sudo run operations with sudo (nopasswd) (deprecated, use
become)
-U SUDO_USER, --sudo-user=SUDO_USER
desired sudo user (default=root) (deprecated, use
become)
-T TIMEOUT, --timeout=TIMEOUT
override the SSH timeout in seconds (default=10)
-t TREE, --tree=TREE log output to this directory
-u REMOTE_USER, --user=REMOTE_USER
connect as this user (default=root)
--vault-password-file=VAULT_PASSWORD_FILE
vault password file
-v, --verbose verbose mode (-vvv for more, -vvvv to enable
connection debugging)
--version show program's version number and exit
[root@vagrant-centos65 vagrant]#


All Done!!

1 comment: