Step1: Verify current version
[root@san-ansible ~]# ansible --version
ansible 2.4.2.0
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, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
[root@san-ansible ~]#
Step2: verify upgrade process.
[root@san-ansible ~]# yum -y update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
No packages marked for update
[root@san-ansible ~]#
Step3: Verify epel repo is installed or not?
[root@san-ansible ~]# yum -y install epel-repo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
No package epel-repo available.
Error: Nothing to do
[root@san-ansible ~]# yum search epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
=============================================================== N/S matched: epel-release ================================================================
epel-release.noarch : Extra Packages for Enterprise Linux repository configuration
Name and summary matches only, use "search all" for everything.
[root@san-ansible ~]# yum info epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
Available Packages
Name : epel-release
Arch : noarch
Version : 7
Release : 11
Size : 15 k
Repo : extras/7/x86_64
Summary : Extra Packages for Enterprise Linux repository configuration
URL : http://download.fedoraproject.org/pub/epel
License : GPLv2
Description : This package contains the Extra Packages for Enterprise Linux (EPEL) repository
: GPG key as well as configuration for yum.
Step4: Install epel repo on CentOS-7
[root@san-ansible ~]# yum install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
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
Is this ok [y/d/N]: y
Downloading packages:
epel-release-7-11.noarch.rpm | 15 kB 00:00:00
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!
Step6: Verify upgrade process if any new packeges are there?
[root@san-ansible ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 7.5 kB 00:00:00
* base: mirrors.piconets.webwerks.in
* epel: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
epel | 5.3 kB 00:00:00
(1/3): epel/x86_64/group_gz | 90 kB 00:00:00
(2/3): epel/x86_64/updateinfo | 1.0 MB 00:00:01
(3/3): epel/x86_64/primary_db | 6.9 MB 00:00:07
Resolving Dependencies
--> Running transaction check
---> Package ansible.noarch 0:2.4.2.0-2.el7 will be updated
---> Package ansible.noarch 0:2.9.2-1.el7 will be an update
---> Package epel-release.noarch 0:7-11 will be updated
---> Package epel-release.noarch 0:7-12 will be an update
---> Package python-passlib.noarch 0:1.6.5-2.el7 will be obsoleted
---> Package python2-passlib.noarch 0:1.7.1-1.el7 will be obsoleting
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================================
Installing:
python2-passlib noarch 1.7.1-1.el7 epel 741 k
replacing python-passlib.noarch 1.6.5-2.el7
Updating:
ansible noarch 2.9.2-1.el7 epel 17 M
epel-release noarch 7-12 epel 15 k
Transaction Summary
==========================================================================================================================================================
Install 1 Package
Upgrade 2 Packages
Total download size: 18 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/epel/packages/epel-release-7-12.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY| 0 B --:--:-- ETA
Public key for epel-release-7-12.noarch.rpm is not installed
(1/3): epel-release-7-12.noarch.rpm | 15 kB 00:00:00
(2/3): ansible-2.9.2-1.el7.noarch.rpm | 17 MB 00:00:19
(3/3): python2-passlib-1.7.1-1.el7.noarch.rpm | 741 kB 00:00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------
Total 914 kB/s | 18 MB 00:00:20
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
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : ansible-2.9.2-1.el7.noarch 1/6
Updating : epel-release-7-12.noarch 2/6
Installing : python2-passlib-1.7.1-1.el7.noarch 3/6
Cleanup : ansible-2.4.2.0-2.el7.noarch 4/6
Erasing : python-passlib-1.6.5-2.el7.noarch 5/6
Cleanup : epel-release-7-11.noarch 6/6
Verifying : python2-passlib-1.7.1-1.el7.noarch 1/6
Verifying : epel-release-7-12.noarch 2/6
Verifying : ansible-2.9.2-1.el7.noarch 3/6
Verifying : python-passlib-1.6.5-2.el7.noarch 4/6
Verifying : epel-release-7-11.noarch 5/6
Verifying : ansible-2.4.2.0-2.el7.noarch 6/6
Installed:
python2-passlib.noarch 0:1.7.1-1.el7
Updated:
ansible.noarch 0:2.9.2-1.el7 epel-release.noarch 0:7-12
Replaced:
python-passlib.noarch 0:1.6.5-2.el7
Complete!
[root@san-ansible ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* epel: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
repo id repo name status
base/7/x86_64 CentOS-7 - Base 10,097
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,523
extras/7/x86_64 CentOS-7 - Extras 323
updates/7/x86_64 CentOS-7 - Updates 1,117
repolist: 25,060
Step7: take a backup of existing configs and remove the older version.
[root@san-ansible ~]# yum remove ansible
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package ansible.noarch 0:2.9.2-1.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================================
Removing:
ansible noarch 2.9.2-1.el7 @epel 104 M
Transaction Summary
==========================================================================================================================================================
Remove 1 Package
Installed size: 104 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : ansible-2.9.2-1.el7.noarch 1/1
Verifying : ansible-2.9.2-1.el7.noarch 1/1
Removed:
ansible.noarch 0:2.9.2-1.el7
Complete!
Step8: Install the latest version.
[root@san-ansible ~]# yum install ansible
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* epel: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
Resolving Dependencies
--> Running transaction check
---> Package ansible.noarch 0:2.9.2-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================================
Installing:
ansible noarch 2.9.2-1.el7 epel 17 M
Transaction Summary
==========================================================================================================================================================
Install 1 Package
Total download size: 17 M
Installed size: 104 M
Is this ok [y/d/N]: y
Downloading packages:
ansible-2.9.2-1.el7.noarch.rpm | 17 MB 00:00:07
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : ansible-2.9.2-1.el7.noarch 1/1
Verifying : ansible-2.9.2-1.el7.noarch 1/1
Installed:
ansible.noarch 0:2.9.2-1.el7
Complete!
[root@san-ansible ~]#
[root@san-ansible ~]#
[root@san-ansible ~]#
[root@san-ansible ~]#
[root@san-ansible ~]# ansible --version
ansible 2.9.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, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
[root@san-ansible ~]#
[root@san-ansible ~]# ansible --version
ansible 2.4.2.0
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, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
[root@san-ansible ~]#
Step2: verify upgrade process.
[root@san-ansible ~]# yum -y update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
No packages marked for update
[root@san-ansible ~]#
Step3: Verify epel repo is installed or not?
[root@san-ansible ~]# yum -y install epel-repo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
No package epel-repo available.
Error: Nothing to do
[root@san-ansible ~]# yum search epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
=============================================================== N/S matched: epel-release ================================================================
epel-release.noarch : Extra Packages for Enterprise Linux repository configuration
Name and summary matches only, use "search all" for everything.
[root@san-ansible ~]# yum info epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
Available Packages
Name : epel-release
Arch : noarch
Version : 7
Release : 11
Size : 15 k
Repo : extras/7/x86_64
Summary : Extra Packages for Enterprise Linux repository configuration
URL : http://download.fedoraproject.org/pub/epel
License : GPLv2
Description : This package contains the Extra Packages for Enterprise Linux (EPEL) repository
: GPG key as well as configuration for yum.
Step4: Install epel repo on CentOS-7
[root@san-ansible ~]# yum install epel-release
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
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
Is this ok [y/d/N]: y
Downloading packages:
epel-release-7-11.noarch.rpm | 15 kB 00:00:00
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!
Step6: Verify upgrade process if any new packeges are there?
[root@san-ansible ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 7.5 kB 00:00:00
* base: mirrors.piconets.webwerks.in
* epel: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
epel | 5.3 kB 00:00:00
(1/3): epel/x86_64/group_gz | 90 kB 00:00:00
(2/3): epel/x86_64/updateinfo | 1.0 MB 00:00:01
(3/3): epel/x86_64/primary_db | 6.9 MB 00:00:07
Resolving Dependencies
--> Running transaction check
---> Package ansible.noarch 0:2.4.2.0-2.el7 will be updated
---> Package ansible.noarch 0:2.9.2-1.el7 will be an update
---> Package epel-release.noarch 0:7-11 will be updated
---> Package epel-release.noarch 0:7-12 will be an update
---> Package python-passlib.noarch 0:1.6.5-2.el7 will be obsoleted
---> Package python2-passlib.noarch 0:1.7.1-1.el7 will be obsoleting
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================================
Installing:
python2-passlib noarch 1.7.1-1.el7 epel 741 k
replacing python-passlib.noarch 1.6.5-2.el7
Updating:
ansible noarch 2.9.2-1.el7 epel 17 M
epel-release noarch 7-12 epel 15 k
Transaction Summary
==========================================================================================================================================================
Install 1 Package
Upgrade 2 Packages
Total download size: 18 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
warning: /var/cache/yum/x86_64/7/epel/packages/epel-release-7-12.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY| 0 B --:--:-- ETA
Public key for epel-release-7-12.noarch.rpm is not installed
(1/3): epel-release-7-12.noarch.rpm | 15 kB 00:00:00
(2/3): ansible-2.9.2-1.el7.noarch.rpm | 17 MB 00:00:19
(3/3): python2-passlib-1.7.1-1.el7.noarch.rpm | 741 kB 00:00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------
Total 914 kB/s | 18 MB 00:00:20
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
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : ansible-2.9.2-1.el7.noarch 1/6
Updating : epel-release-7-12.noarch 2/6
Installing : python2-passlib-1.7.1-1.el7.noarch 3/6
Cleanup : ansible-2.4.2.0-2.el7.noarch 4/6
Erasing : python-passlib-1.6.5-2.el7.noarch 5/6
Cleanup : epel-release-7-11.noarch 6/6
Verifying : python2-passlib-1.7.1-1.el7.noarch 1/6
Verifying : epel-release-7-12.noarch 2/6
Verifying : ansible-2.9.2-1.el7.noarch 3/6
Verifying : python-passlib-1.6.5-2.el7.noarch 4/6
Verifying : epel-release-7-11.noarch 5/6
Verifying : ansible-2.4.2.0-2.el7.noarch 6/6
Installed:
python2-passlib.noarch 0:1.7.1-1.el7
Updated:
ansible.noarch 0:2.9.2-1.el7 epel-release.noarch 0:7-12
Replaced:
python-passlib.noarch 0:1.6.5-2.el7
Complete!
[root@san-ansible ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* epel: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
repo id repo name status
base/7/x86_64 CentOS-7 - Base 10,097
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,523
extras/7/x86_64 CentOS-7 - Extras 323
updates/7/x86_64 CentOS-7 - Updates 1,117
repolist: 25,060
Step7: take a backup of existing configs and remove the older version.
[root@san-ansible ~]# yum remove ansible
Loaded plugins: fastestmirror
Resolving Dependencies
--> Running transaction check
---> Package ansible.noarch 0:2.9.2-1.el7 will be erased
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================================
Removing:
ansible noarch 2.9.2-1.el7 @epel 104 M
Transaction Summary
==========================================================================================================================================================
Remove 1 Package
Installed size: 104 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : ansible-2.9.2-1.el7.noarch 1/1
Verifying : ansible-2.9.2-1.el7.noarch 1/1
Removed:
ansible.noarch 0:2.9.2-1.el7
Complete!
Step8: Install the latest version.
[root@san-ansible ~]# yum install ansible
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.piconets.webwerks.in
* epel: mirrors.piconets.webwerks.in
* extras: mirrors.piconets.webwerks.in
* updates: mirrors.piconets.webwerks.in
Resolving Dependencies
--> Running transaction check
---> Package ansible.noarch 0:2.9.2-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================================
Installing:
ansible noarch 2.9.2-1.el7 epel 17 M
Transaction Summary
==========================================================================================================================================================
Install 1 Package
Total download size: 17 M
Installed size: 104 M
Is this ok [y/d/N]: y
Downloading packages:
ansible-2.9.2-1.el7.noarch.rpm | 17 MB 00:00:07
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : ansible-2.9.2-1.el7.noarch 1/1
Verifying : ansible-2.9.2-1.el7.noarch 1/1
Installed:
ansible.noarch 0:2.9.2-1.el7
Complete!
[root@san-ansible ~]#
[root@san-ansible ~]#
[root@san-ansible ~]#
[root@san-ansible ~]#
[root@san-ansible ~]# ansible --version
ansible 2.9.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, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
[root@san-ansible ~]#