Original Message:
Sent: Fri August 11, 2023 07:02 AM
From: SANKET RATHI
Subject: Ansible setup on AIX
rpm -e <pkg_name> is command to remove rpm.
Original Message:
Sent: 8/11/2023 5:57:00 AM
From: Manoj Kumar
Subject: RE: Ansible setup on AIX
Thanks Sanket, we have taken all files/drectory backup which was coming through rpm -ql <rpm_pkg> command. Would you please tell us now how we can remove that openssl rpm and all other rpm which was installed through DNF.
Few packages were installed before DNF tools.
------------------------------
Manoj Kumar
Original Message:
Sent: Thu August 10, 2023 02:14 PM
From: SANKET RATHI
Subject: Ansible setup on AIX
I think there is no easy way for both of them.
- To take backup of an installed rpm. I can think best way to list all the files by that rpm and take backup/tar of that
$ rpm -ql <rpm_name>
- To remove all the rpms installed by dnf script you will have to find those files. You can try following command to know all rpms installed on that day and after
$ rpm -qa --last
Original Message:
Sent: 8/10/2023 8:17:00 AM
From: Manoj Kumar
Subject: RE: Ansible setup on AIX
Hi Team,
Did anyone check my last comment? It would be really helpful if somebody response on it.
------------------------------
Manoj Kumar
Original Message:
Sent: Tue August 01, 2023 07:20 AM
From: Manoj Kumar
Subject: Ansible setup on AIX
Hi Team,
Did you check my query in last post?
How we can take backup of that openssl rpm package?
another question was in my earlier post. If we have to get rid of full DNF package and all dependent which we installed through dnf_toolbox script. How we can do that? We don't want to remove other rpm package which was already there on the server before installing this DNF tool.
------------------------------
Manoj Kumar
Original Message:
Sent: Thu July 27, 2023 06:12 AM
From: Manoj Kumar
Subject: Ansible setup on AIX
Thanks Andrey for the update.
We will try to get rid of this as this is old and seems to be not used on all servers, only few servers having this package.
How we can take the backup of this package, which files we need to take backup?
------------------------------
Manoj Kumar
Original Message:
Sent: Thu July 27, 2023 04:36 AM
From: Andrey Klyachkin
Subject: Ansible setup on AIX
Hi Manoj,
nobody knows your system better than you. Someone who installed the package, might have some thoughts installing it.
If you are unsure, make a backup, remove the package, test the system, if everything works as it should. If you find some problems with the system, restore it from the backup.
Anyway OpenSSL 0.9.7 is old, unsupported and buggy. If I were your security auditor, you'd have a security finding right now.
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Thu July 27, 2023 03:39 AM
From: Manoj Kumar
Subject: Ansible setup on AIX
Hello Team,
Did anyone have idea or suggestion on it?
------------------------------
Manoj Kumar
Original Message:
Sent: Tue July 25, 2023 09:48 AM
From: Manoj Kumar
Subject: Ansible setup on AIX
If I remove this openssl, will it not impact anything on the system?
------------------------------
Manoj Kumar
Original Message:
Sent: Tue July 25, 2023 08:39 AM
From: Ayappan P
Subject: Ansible setup on AIX
Remove the openssl rpm. "rpm -e openssl"
------------------------------
Ayappan P
Original Message:
Sent: Tue July 25, 2023 08:01 AM
From: Manoj Kumar
Subject: Ansible setup on AIX
Apologies for the post on existing case. Next time onwards will open new discussion.
On this
-> You may remove RPM packages using dnf remove. But some of the packages like python3 are "protected". It is the same story as with AIX - if you remove AIX kernel, AIX will not boot anymore. That's why you are not allowed to remove every single package. Same is here - if you remove python, you will not be able to use dnf anymore. That's why you are not allowed to remove python and some other very important packages
I asked this question because if we have to get rid of complete dnf package what we installed to setup ansible. We didn't have this setup so just thought how we can get rid of python and all other packages with dnf itself.
Regarding DNF problem: Here is the output of all commands.
server: root] /> echo $LIBPATH
server: root] /> ls -l /opt/freeware/lib/libcrypto* /opt/freeware/lib/libssl*
-rwxr-xr-x 1 root system 6210600 Oct 04 2006 /opt/freeware/lib/libcrypto.a
-rwxr-xr-x 1 root system 1191902 Oct 04 2006 /opt/freeware/lib/libssl.a
lrwxrwxrwx 1 root system 26 Jul 25 05:59 /opt/freeware/lib/libssl3.a -> /usr/opt/rpm/lib/libssl3.a
lrwxrwxrwx 1 root system 27 Jul 25 05:59 /opt/freeware/lib/libssl3.so -> /usr/opt/rpm/lib/libssl3.so
server: root] /> rpm -qf /opt/freeware/lib/libcrypto.a
openssl-0.9.7l-1.ppc
server: root] /> rpm -qi openssl-0.9.7l-1.ppc
Name : openssl
Version : 0.9.7l
Release : 1
Architecture: ppc
Install Date: Thu Dec 21 23:48:57 EST 2017
Group : System Environment/Libraries
Size : 9685603
License : OpenSSL License
Signature : (none)
Source RPM : openssl-0.9.7l-1.src.rpm
Build Date : Thu Dec 21 23:48:12 EST 2017
Build Host : server
Summary : Secure Sockets Layer and cryptography libraries and tools
Description :
The OpenSSL Project is a collaborative effort to develop a robust,
commercial-grade, fully featured, and Open Source toolkit implementing the
Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1)
protocols as well as a full-strength general purpose cryptography library.
The project is managed by a worldwide community of volunteers that use the
Internet to communicate, plan, and develop the OpenSSL tookit and its related
documentation.
OpenSSL is based on the excellent SSLeay library developed from Eric A. Young
and Tim J. Hudson. OpenSSL is licensed under the OpenSSL License, included in
this package.
This package contains the base OpenSSL cryptography and SSL/TLS libraries and
tools.
You should also install a pseudo-random number generator such as EGD or prngd
if you do not have a /dev/urandom and /dev/random.
------------------------------
Manoj Kumar
Original Message:
Sent: Tue July 25, 2023 07:19 AM
From: Andrey Klyachkin
Subject: Ansible setup on AIX
Hi Manoj,
I suggest you to open new topics for each new problem you have. It makes it easier for other users to search through forums if they have similar problems.
You may remove RPM packages using dnf remove. But some of the packages like python3 are "protected". It is the same story as with AIX - if you remove AIX kernel, AIX will not boot anymore. That's why you are not allowed to remove every single package. Same is here - if you remove python, you will not be able to use dnf anymore. That's why you are not allowed to remove python and some other very important packages.
Regarding your problem with DNF, it looks like you have some OpenSSL-related problem. First of all it tries to load OpenSSL from the wrong location:
0509-150 Dependent module /opt/freeware/lib/libcrypto.a(libcrypto.so.1.1) could not be loaded.
The correct location for OpenSSL libraries is /usr/lib/libcrypto.a and /usr/lib/libssl.a.
Check if you have wrong LIBPATH variable:
echo $LIBPATH
Check if you have OpenSSL in /opt/freeware/lib:
ls -l /opt/freeware/lib/libcrypto* /opt/freeware/lib/libssl*
If you have OpenSSL in /opt/freeware/lib, check if you have a package for them:
rpm -qf /opt/freeware/lib/libcrypto.a
If you find the package, check where it comes from:
rpm -qi <package-name>
Try to remove it manually:
rpm -e <package-name>
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Tue July 25, 2023 07:07 AM
From: Manoj Kumar
Subject: Ansible setup on AIX
When I tried to update python packages with dnf command, I am getting following error. Would you please help to fix the issue?
Traceback (most recent call last):
File "/opt/freeware/bin/dnf", line 57, in <module>
from dnf.cli import main
File "/opt/freeware/lib/python3.9/site-packages/dnf/__init__.py", line 32, in <module>
import dnf.base
File "/opt/freeware/lib/python3.9/site-packages/dnf/base.py", line 29, in <module>
import libdnf.transaction
File "/opt/freeware/lib/python3.9/site-packages/libdnf/__init__.py", line 3, in <module>
from . import common_types
File "/opt/freeware/lib/python3.9/site-packages/libdnf/common_types.py", line 13, in <module>
from . import _common_types
ImportError: 0509-022 Cannot load module /opt/freeware/lib/libdnf.a(libdnf.so.2).
0509-150 Dependent module /opt/freeware/lib/libcrypto.a(libcrypto.so.1.1) could not be loaded.
0509-152 Member libcrypto.so.1.1 is not found in archive
0509-022 Cannot load module /opt/freeware/lib/python3.9/site-packages/libdnf/_common_types.so.
0509-150 Dependent module /opt/freeware/lib/libdnf.a(libdnf.so.2) could not be loaded.
And one more thing How we can remove open source packages from DNF? When I tried to remove python3 with the below command, I am getting error.
/opt/freeware/bin/dnf remove python3
Error:
Problem: The operation would result in removing the following protected packages: dnf
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
------------------------------
Manoj Kumar
Original Message:
Sent: Tue May 16, 2023 11:35 AM
From: Alexander Reichle-Schmehl
Subject: Ansible setup on AIX
Hi Manoj!
Unless you precisely know that you need to support weak ciphers, go for VRMF: 1.1.2.2000 (1.1.1t with no weak ciphers support)
.
Best regards,
Alexander
------------------------------
Alexander Reichle-Schmehl
Original Message:
Sent: Tue May 16, 2023 09:04 AM
From: Manoj Kumar
Subject: Ansible setup on AIX
Hi Andrey,
We have openssh version 8.1.112.1201 available for 1.1.1* openssl version.
Written on IBM site: OpenSSH 8.1 (compiled with Openssl 1.1.1)
For openssl there are two version available given below and remember this is the latest version available. So which one we should installed. Current version on all server is 1.0.2.2105 or 2106.
VRMF: 1.1.2.2000 (1.1.1t with no weak ciphers support)
VRMF: 1.1.1.2000 (1.1.1t with all ciphers support)
------------------------------
Manoj Kumar
Original Message:
Sent: Fri May 12, 2023 09:30 AM
From: Andrey Klyachkin
Subject: Ansible setup on AIX
Sorry, Manoj, I don't know your environment, but I see the error and I know what causes the error. You must update OpenSSL to get sudo working. You may need update OpenSSH too to get it working with newer OpenSSL.
Of course it is correct only if you installed sudo from AIX Toolbox for Opensource applications. Otherwise you have to speak to your sudo's provider.
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Fri May 12, 2023 09:17 AM
From: Manoj Kumar
Subject: Ansible setup on AIX
Hi Andrey,
But all servers in our environment having the same openssl and it is working fine on rest of the servers apart from these 3 servers. Is it something related to library or path?
working server
root@dsmjca001s:/# ssh -V
OpenSSH_8.1p1, OpenSSL 1.0.2u 20 Dec 2019
root@dsmjca001s:/# lslpp -l|grep -i openss
openssh.base.client 8.1.102.2106 COMMITTED Open Secure Shell Commands
openssh.base.server 8.1.102.2106 COMMITTED Open Secure Shell Server
openssh.license 8.1.102.2106 COMMITTED Open Secure Shell License
openssh.man.en_US 8.1.102.2106 COMMITTED Open Secure Shell
openssh.msg.EN_US 8.1.102.2106 COMMITTED Open Secure Shell Messages -
openssh.msg.en_US 8.1.102.2106 COMMITTED Open Secure Shell Messages -
openssl.base 1.0.2.2105 COMMITTED Open Secure Socket Layer
openssl.license 1.0.2.2105 COMMITTED Open Secure Socket License
openssl.man.en_US 1.0.2.2105 COMMITTED Open Secure Socket Layer
openssh.base.client 8.1.102.2106 COMMITTED Open Secure Shell Commands
openssh.base.server 8.1.102.2106 COMMITTED Open Secure Shell Server
openssl.base 1.0.2.2105 COMMITTED Open Secure Socket Layer
Non-working server.
root@dsmjca71img:/# ssh -V
OpenSSH_8.1p1, OpenSSL 1.0.2u 20 Dec 2019
root@dsmjca71img:/# lslpp -l|grep -i openss
openssh.base.client 8.1.102.2106 COMMITTED Open Secure Shell Commands
openssh.base.server 8.1.102.2106 COMMITTED Open Secure Shell Server
openssh.license 8.1.102.2106 COMMITTED Open Secure Shell License
openssh.man.en_US 8.1.102.2106 COMMITTED Open Secure Shell
openssh.msg.EN_US 8.1.102.2106 COMMITTED Open Secure Shell Messages -
openssh.msg.en_US 8.1.102.2106 COMMITTED Open Secure Shell Messages -
openssl.base 1.0.2.2106 COMMITTED Open Secure Socket Layer
openssl.license 1.0.2.2106 COMMITTED Open Secure Socket License
openssl.man.en_US 1.0.2.2106 COMMITTED Open Secure Socket Layer
openssh.base.client 8.1.102.2106 COMMITTED Open Secure Shell Commands
openssh.base.server 8.1.102.2106 COMMITTED Open Secure Shell Server
openssl.base 1.0.2.2106 COMMITTED Open Secure Socket Layer
------------------------------
Manoj Kumar
Original Message:
Sent: Fri May 12, 2023 08:50 AM
From: Andrey Klyachkin
Subject: Ansible setup on AIX
You have too old OpenSSL. Update it to OpenSSL 1.1.1 and it will work.
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Fri May 12, 2023 08:07 AM
From: Manoj Kumar
Subject: Ansible setup on AIX
Hi Andrey,
LIBPATH variable issue was only on one server which was fixed. but we still have 3 servers where we are having sudo -l issue.
Output already pasted in group. So now we need to fixed that issue on those 3 servers. If we fixed that then we should be good to run ansible. We are having below given openssl version on all servers.
As recommended by Alexander we have remove become root from ansible.cfg sript and it works on all servers. But as of now we have to fix sudo -l issue on all 3 servers.
openssl.base 1.0.2.2105 COMMITTED Open Secure Socket Layer
------------------------------
Manoj Kumar
Original Message:
Sent: Fri May 12, 2023 07:51 AM
From: Andrey Klyachkin
Subject: Ansible setup on AIX
Unfortunately, it is not the complete output. But anyway we don't need it anymore, if you've found that the problem was because of LIBPATH variable.
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Fri May 12, 2023 06:36 AM
From: Manoj Kumar
Subject: Ansible setup on AIX
Please find the output below.
[root@hld10297 AIX]# ansible -m ping dsmjca71img -vvv
ansible [core 2.13.3]
config file = /home/automation/ansible/AIX/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.9.13 (main, Nov 9 2022, 13:16:24) [GCC 8.5.0 20210514 (Red Hat 8.5.0-15)]
jinja version = 3.1.2
libyaml = True
Using /home/automation/ansible/AIX/ansible.cfg as config file
host_list declined parsing /home/automation/ansible/AIX/inventory as it did not pass its verify_file() method
script declined parsing /home/automation/ansible/AIX/inventory as it did not pass its verify_file() method
auto declined parsing /home/automation/ansible/AIX/inventory as it did not pass its verify_file() method
Parsed /home/automation/ansible/AIX/inventory inventory source with ini plugin
[WARNING]: Could not match supplied host pattern, ignoring: dsmjca71img
[WARNING]: No hosts matched, nothing to do
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
------------------------------
Manoj Kumar
Original Message:
Sent: Fri May 12, 2023 06:29 AM
From: Andrey Klyachkin
Subject: Ansible setup on AIX
Hi Manoj,
the message you've posted may have a lot of different causes. Can you re-run your command with '-vvv' at the end and post the output? It will be a lot of text with different commands and may be some error messages.
ansible -m ping dsmjca71img -vvv
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Wed May 10, 2023 12:17 PM
From: Manoj Kumar
Subject: Ansible setup on AIX
We installed python on few servers and it is working fine on few servers but today when we try to install it on 2 or more servers. It's not working.
Method which we used for installation on AIX.
First download the dnf script and copy it to client.
Then run ./dnf_aixtoolbox.sh -d from the client.
After that command successfully executed, we have updated the packages to latest level with ./dnf update command.
copy controller node public key into client authorized keys.
After that I tried to run ansible -m ping all but it gives below error. Could you please suggest what is next steps.
[root@hld10297 AIX]# ansible -m ping all
dsmjca71img | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: Shared connection to dsmjca71img closed.",
"unreachable": true
}
[root@hld10297 AIX]# cat inventory
dsmjca71img
[root@hld10297 AIX]# cat ansible.cfg
[defaults]
inventory=/home/automation/ansible/AIX/inventory
log_path=/home/automation/ansible/AIX/ansible_logs
interpreter_python=/opt/freeware/bin/python3
forks=10
#interpreter_python=auto_silent
[privilege_escalation]
become=true
become_user=root
become_method=sudo
Regards
Manoj
------------------------------
Manoj Kumar
Original Message:
Sent: Mon March 13, 2023 10:30 AM
From: Stephen Ulmer
Subject: Ansible setup on AIX
Okay, please be very specific about where you are invoking ansible, and what you are managing...
ansible.cfg mostly configures things on the control/management node. If you have different interpreter paths on different classes of managed nodes, you should change those paths by setting variables in the inventory.
--
Stephen L. Ulmer
Enterprise Architect
Mainline Information Systems
Original Message:
Sent: 3/13/2023 8:52:00 AM
From: Manoj Kumar
Subject: RE: Ansible setup on AIX
One thing would like to add the controlled node here is Linux.
------------------------------
Manoj Kumar
Original Message:
Sent: Tue March 07, 2023 03:11 AM
From: Andrey Klyachkin
Subject: Ansible setup on AIX
Hi Manoj,
Ansible looks for python interpreter in /usr/bin/python. Old RPM packages created a symlink in /usr/bin for python binaries. New RPM packages don't do it anymore. Because you didn't provide any error message, I can suppose that this is the reason for your failure - the failing server doesn't have /usr/bin/python.
The choices you have:
- create symlinks in /usr/bin. I wouldn't recommend unless you know what you're doing.
- add a variable ansible_python_interpreter: /opt/freeware/bin/python3 in your playbooks. This is my favourite way of solving the problem.
- add a global configuration interpreter_python = /opt/freeware/bin/python3 in /opt/freeware/etc/ansible/ansible.cfg on your Ansible controller node.
More about Python discovery in Ansible you can read here - https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html
------------------------------
Andrey Klyachkin
https://www.power-devops.com
Original Message:
Sent: Mon March 06, 2023 09:39 AM
From: Manoj Kumar
Subject: Ansible setup on AIX
Hi Team,
I am trying to setup ansible on AIX, so we have installed ansible and python on AIX servers. On client one of the server having python2 and other having python3.
I am not sure how python2 was installed, it seems it was installed manually with all dependency altogether with rpm command.
Python3 was installed with dnf install command, so everything was installed automatically and updated. Python3 client is not working because having some link with other directory but python2 is working fine which is having link with /usr/bin/ directory. So I am not sure which is the correct way of doing this setup.
Would you please help?
Working client ->
root@dsmppa003t:/opt/freeware/bin# ls -ltr /usr/bin/python*
lrwxrwxrwx 1 root system 35 Aug 25 08:38 /usr/bin/python2.7_64 -> ../../opt/freeware/bin/python2.7_64
lrwxrwxrwx 1 root system 39 Aug 25 08:38 /usr/bin/python2.7-config -> ../../opt/freeware/bin/python2.7-config
lrwxrwxrwx 1 root system 32 Aug 25 08:38 /usr/bin/python2.7 -> ../../opt/freeware/bin/python2.7
lrwxrwxrwx 1 root system 37 Aug 25 08:38 /usr/bin/python2-config -> ../../opt/freeware/bin/python2-config
lrwxrwxrwx 1 root system 30 Aug 25 08:38 /usr/bin/python2 -> ../../opt/freeware/bin/python2
lrwxrwxrwx 1 root system 36 Aug 25 08:38 /usr/bin/python-config -> ../../opt/freeware/bin/python-config
lrwxrwxrwx 1 root system 29 Aug 25 08:38 /usr/bin/python -> ../../opt/freeware/bin/python
lrwxrwxrwx 1 root system 39 Aug 25 08:38 /usr/bin/python_64-config -> ../../opt/freeware/bin/python_64-config
lrwxrwxrwx 1 root system 32 Aug 25 08:38 /usr/bin/python_64 -> ../../opt/freeware/bin/python_64
lrwxrwxrwx 1 root system 40 Aug 25 08:38 /usr/bin/python2_64-config -> ../../opt/freeware/bin/python2_64-config
lrwxrwxrwx 1 root system 33 Aug 25 08:38 /usr/bin/python2_64 -> ../../opt/freeware/bin/python2_64
lrwxrwxrwx 1 root system 42 Aug 25 08:38 /usr/bin/python2.7_64-config -> ../../opt/freeware/bin/python2.7_64-config
Non-working client ->
root@dsmppa001s:/opt/freeware/bin#
lrwxrwxrwx 1 root system 10 Jan 09 08:09 python3 -> python3_64
lrwxrwxrwx 1 root system 12 Jan 09 08:09 python3.7 -> python3.7_64
lrwxrwxrwx 1 root system 13 Jan 09 08:09 python3.7_32 -> python3.7m_32
lrwxrwxrwx 1 root system 13 Jan 09 08:09 python3.7_64 -> python3.7m_64
lrwxrwxrwx 1 root system 13 Jan 09 08:09 python3.7m -> python3.7m_64
lrwxrwxrwx 1 root system 12 Jan 09 08:09 python3_32 -> python3.7_32
lrwxrwxrwx 1 root system 12 Jan 09 08:09 python3_64 -> python3.7_64
lrwxrwxrwx 1 root system 13 Jan 09 08:09 pyvenv-3.7 -> pyvenv-3.7_64
lrwxrwxrwx 1 root system 9 Jan 09 08:09 pyvenv -> pyvenv_64
------------------------------
Manoj Kumar
------------------------------