Installation of Ansible Packages on Oracle Linux 7
Posted by Mir Sayeed Hassan on October 29th, 2023
Installation of Ansible Packages in Oracle Linux
Download the below require Packages to configure ansible.
[root@ansible-test]# cd /u02/SOURCE/RPM_PKG/ansible/ [root@ansible-test]# ll total 17808 -rwxrwxrwx. 1 root root 17832207 Oct 29 15:26 ansible-2.9.27-1.el7.noarch (2).rpm -rwxrwxrwx. 1 root root 42303 Oct 29 15:26 python2-jmespath-0.9.4-2.el7.noarch (1) (1).rpm -rwxrwxrwx. 1 root root 211503 Oct 29 15:26 python-html5lib-0.999-7.el7.noarch (1) (1).rpm -rwxrwxrwx. 1 root root 117968 Oct 29 15:26 python-httplib2-0.9.2-1.el7.noarch (1) (1).rpm -rwxrwxrwx. 1 root root 21848 Oct 29 15:26 sshpass-1.06-1.el7.x86_64 (1) (1).rpm [root@ansible-test]# rpm -ivh python2-jmespath-0.9.4-2.el7.noarch\ \(1\).rpm warning: python2-jmespath-0.9.4-2.el7.noarch (1).rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:python2-jmespath-0.9.4-2.el7 ################################# [100%]
[root@ansible-test]# rpm -ivh python-html5lib-0.999-7.el7.noarch\ \(1\).rpm warning: python-html5lib-0.999-7.el7.noarch (1).rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:python-html5lib-1:0.999-7.el7 ################################# [100%]
[root@ansible-test]# rpm -ivh sshpass-1.06-1.el7.x86_64\ \(1\).rpm warning: sshpass-1.06-1.el7.x86_64 (1).rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:sshpass-1.06-1.el7 ################################# [100%]
[root@ansible-test]# rpm -ivh python-httplib2-0.9.2-1.el7.noarch\ \(1\).rpm Preparing... ################################# [100%] Updating / installing... 1:python-httplib2-0.9.2-1.el7 ################################# [100%]
[root@ansible-test]# rpm -ivh ansible-2.9.27-1.el7.noarch\ \(2\).rpm warning: ansible-2.9.27-1.el7.noarch (2).rpm: Header V4 RSA/SHA256 Signature, key ID 352c64e5: NOKEY error: Failed dependencies: PyYAML is needed by ansible-2.9.27-1.el7.noarch python-jinja2 is needed by ansible-2.9.27-1.el7.noarch python-paramiko is needed by ansible-2.9.27-1.el7.noarch python-setuptools is needed by ansible-2.9.27-1.el7.noarch python-six is needed by ansible-2.9.27-1.el7.noarch python2-cryptography is needed by ansible-2.9.27-1.el7.noarch
Note: The above package is not install properly., Need to Install the dependency & then proceed further.
To install by using the yum respository: Asssign the Repository on this server or mount the iso file into this server.
[root@ansible-test]# yum install PyYAML* Loaded plugins: ulninfo Resolving Dependencies --> 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 --> Running transaction check ---> Package libyaml.x86_64 0:0.1.4-11.el7_0 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================================ Installing: PyYAML x86_64 3.10-11.el7 local 153 k Installing for dependencies: libyaml x86_64 0.1.4-11.el7_0 local 54 k Transaction Summary ================================================================================================================================================================================================ Install 1 Package (+1 Dependent package) Total download size: 207 k Installed size: 760 k Is this ok [y/d/N]: y Downloading packages: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Total 1.7 MB/s | 207 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Warning: RPMDB altered outside of yum. Installing : libyaml-0.1.4-11.el7_0.x86_64 1/2 Installing : PyYAML-3.10-11.el7.x86_64 2/2 Verifying : libyaml-0.1.4-11.el7_0.x86_64 1/2 Verifying : PyYAML-3.10-11.el7.x86_64 2/2 Installed: PyYAML.x86_64 0:3.10-11.el7 Dependency Installed: libyaml.x86_64 0:0.1.4-11.el7_0 Complete!
[root@ansible-test]# yum install python-jinja2 Loaded plugins: ulninfo Resolving Dependencies --> Running transaction check ---> Package python-jinja2.noarch 0:2.7.2-4.el7 will be installed --> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.7.2-4.el7.noarch --> Processing Dependency: python-markupsafe for package: python-jinja2-2.7.2-4.el7.noarch --> Running transaction check ---> Package python-babel.noarch 0:0.9.6-8.el7 will be installed ---> Package python-markupsafe.x86_64 0:0.11-10.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================================ Installing: python-jinja2 noarch 2.7.2-4.el7 local 518 k Installing for dependencies: python-babel noarch 0.9.6-8.el7 local 1.4 M python-markupsafe x86_64 0.11-10.el7 local 25 k Transaction Summary ================================================================================================================================================================================================ Install 1 Package (+2 Dependent packages) Total download size: 1.9 M Installed size: 8.2 M Is this ok [y/d/N]: y Downloading packages: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Total 20 MB/s | 1.9 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : python-markupsafe-0.11-10.el7.x86_64 1/3 Installing : python-babel-0.9.6-8.el7.noarch 2/3 Installing : python-jinja2-2.7.2-4.el7.noarch 3/3 Verifying : python-babel-0.9.6-8.el7.noarch 1/3 Verifying : python-jinja2-2.7.2-4.el7.noarch 2/3 Verifying : python-markupsafe-0.11-10.el7.x86_64 3/3 Installed: python-jinja2.noarch 0:2.7.2-4.el7 Dependency Installed: python-babel.noarch 0:0.9.6-8.el7 python-markupsafe.x86_64 0:0.11-10.el7 Complete!
[root@ansible-test]# yum install python-paramiko Loaded plugins: ulninfo Resolving Dependencies --> Running transaction check ---> Package python-paramiko.noarch 0:2.1.1-9.el7 will be installed --> Processing Dependency: python2-pyasn1 for package: python-paramiko-2.1.1-9.el7.noarch --> Processing Dependency: python-cryptography for package: python-paramiko-2.1.1-9.el7.noarch --> Running transaction check ---> Package python2-cryptography.x86_64 0:1.7.2-2.el7 will be installed --> Processing Dependency: python-six >= 1.4.1 for package: python2-cryptography-1.7.2-2.el7.x86_64 --> 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-setuptools for package: python2-cryptography-1.7.2-2.el7.x86_64 --> Processing Dependency: python-ipaddress 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 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 ---> 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 --> Running transaction check ---> Package python-backports-ssl_match_hostname.noarch 0:3.5.0.1-1.el7 will be installed --> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch ---> 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-backports.x86_64 0:1.0-8.el7 will be installed ---> Package python-ply.noarch 0:3.4-11.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================================ Installing: python-paramiko noarch 2.1.1-9.el7 local 268 k Installing for dependencies: python-backports x86_64 1.0-8.el7 local 5.2 k python-backports-ssl_match_hostname noarch 3.5.0.1-1.el7 local 12 k python-cffi x86_64 1.6.0-5.el7 local 217 k python-enum34 noarch 1.0.4-1.el7 local 52 k python-idna noarch 2.4-1.el7 local 93 k python-ipaddress noarch 1.0.16-2.el7 local 34 k python-ply noarch 3.4-11.el7 local 122 k python-pycparser noarch 2.14-1.el7 local 104 k python-setuptools noarch 0.9.8-7.el7 local 397 k python-six noarch 1.9.0-2.el7 local 28 k python2-cryptography x86_64 1.7.2-2.el7 local 498 k python2-pyasn1 noarch 0.1.9-7.el7 local 99 k Transaction Summary ================================================================================================================================================================================================ Install 1 Package (+12 Dependent packages) Total download size: 1.9 M Installed size: 9.6 M Is this ok [y/d/N]: y Downloading packages: ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Total 9.3 MB/s | 1.9 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : python2-pyasn1-0.1.9-7.el7.noarch 1/13 Installing : python-ipaddress-1.0.16-2.el7.noarch 2/13 Installing : python-six-1.9.0-2.el7.noarch 3/13 Installing : python-enum34-1.0.4-1.el7.noarch 4/13 Installing : python-backports-1.0-8.el7.x86_64 5/13 Installing : python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch 6/13 Installing : python-setuptools-0.9.8-7.el7.noarch 7/13 Installing : python-ply-3.4-11.el7.noarch 8/13 Installing : python-pycparser-2.14-1.el7.noarch 9/13 Installing : python-cffi-1.6.0-5.el7.x86_64 10/13 Installing : python-idna-2.4-1.el7.noarch 11/13 Installing : python2-cryptography-1.7.2-2.el7.x86_64 12/13 Installing : python-paramiko-2.1.1-9.el7.noarch 13/13 Verifying : python-idna-2.4-1.el7.noarch 1/13 Verifying : python-pycparser-2.14-1.el7.noarch 2/13 Verifying : python-ply-3.4-11.el7.noarch 3/13 Verifying : python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch 4/13 Verifying : python-paramiko-2.1.1-9.el7.noarch 5/13 Verifying : python-backports-1.0-8.el7.x86_64 6/13 Verifying : python-cffi-1.6.0-5.el7.x86_64 7/13 Verifying : python-ipaddress-1.0.16-2.el7.noarch 8/13 Verifying : python-enum34-1.0.4-1.el7.noarch 9/13 Verifying : python2-pyasn1-0.1.9-7.el7.noarch 10/13 Verifying : python-six-1.9.0-2.el7.noarch 11/13 Verifying : python-setuptools-0.9.8-7.el7.noarch 12/13 Verifying : python2-cryptography-1.7.2-2.el7.x86_64 13/13 Installed: python-paramiko.noarch 0:2.1.1-9.el7 Dependency Installed: 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-idna.noarch 0:2.4-1.el7 python-ipaddress.noarch 0:1.0.16-2.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-cryptography.x86_64 0:1.7.2-2.el7 python2-pyasn1.noarch 0:0.1.9-7.el7 Complete!
[root@ansible-test]# rpm -ivh ansible-2.9.27-1.el7.noarch\ \(2\).rpm warning: ansible-2.9.27-1.el7.noarch (2).rpm: Header V4 RSA/SHA256 Signature, key ID 352c64e5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:ansible-2.9.27-1.el7 ################################# [100%] Verify [root@ansible-test]# ansible --version ansible 2.9.27 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, Nov 27 2019, 09:57:45) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39.0.1)]