Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
Expand all | Collapse all

Ansible for AIX system adminitrators / Help for beginners please !

  • 1.  Ansible for AIX system adminitrators / Help for beginners please !

    Posted Tue August 29, 2023 04:56 AM

    Hello,

    We are AIX system administrators.

    We would like to use ANSIBLE as it seems to be very interesting.

    We know we have to install ANSIBLE on an AIX LPAR or LINUX LPAR, does that make a difference ?

    Would you recommend to install ansible on our NIM master LPAR ? Or on separate AIX LPAR ?

    As AIX system administrators we have full access to AIX LPARs, not LINUX LPARS...

    Would you recommend to work with ansible installed on an AIX 7.3 LPAR ?

    We thank you very much for help and recommendations.

    Have a nice day,

    Christophe



    ------------------------------
    christophe derouet
    ------------------------------

    #AIXOpenSource


  • 2.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Tue August 29, 2023 07:45 AM

    Hi Christophe,

    it is great that you want to try Ansible! It definitely can help you and your team to minimize repetitive tasks and be more agile. The answers to your questions you will hopefully find in the new Redbook "Using Ansible for automation in IBM Power environments". I hope the first draft will be published middle of September.

    Till that time I can post here my opinion.

    If you are an AIX administrator and just starting with Ansible, install Ansible on AIX. It is easy, especially if you configured DNF. You don't need any separate LPARs, you can install it on NIM. NIM is always the first choice for me. If your NIM server has SSH access to your client LPARs, you don't need anything else. If it hasn't, then you may think about other LPARs. Ansible requires SSH access to every and each LPAR to manage, REST API access to HMC and PowerVC if you want to manage them too.

    Regarding AIX 7.3 - yes. If your NIM server is already on AIX 7.3, feel free to install Ansible there. All my test systems with Ansible have already AIX 7.3. There are no any disadvantages or problems using Ansible on AIX 7.3 comparing to AIX 7.2.

    Now the most difficult question - the difference between AIX and Linux using Ansible. Ansible is developed under Linux. It means you will always have fresher version of Ansible on Linux. As for now we have Ansible Core 2.14 on AIX. On Linux you can install Ansible Core 2.15. But frankly speaking I don't see why someone should want to use the latest version of Ansible. Red Hat uses Ansible Core 2.14 too in their Ansible Automation Platform. On most of the tasks especially in the very beginning you will not notice any difference.

    Start easy - dnf install ansible - and you have it on your AIX box, try some basic examples and feel free to ask questions in the forum. There are a lot of experts here who can help you.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 3.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Tue August 29, 2023 08:52 AM
    Edited by christophe derouet Tue August 29, 2023 09:13 AM

    Hello Andrey,

    I thank you very much for your reply. It is nice to hear a redbook is coming soon ! It will be very helpfull.

    I know we do not need to install Ansible agent on AIX client partitions. But are there prerequisites on Ansible client AIX partitions ? I mean minimum level of Python ? Or other rpm packages ?

    We thank you very much for your help,

    Christophe



    ------------------------------
    christophe derouet
    ------------------------------



  • 4.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Tue August 29, 2023 09:07 AM

    Hi Christophe,

    Ansible doesn't need any agent on AIX side. But yes, for most of the functions you need Python on AIX. Starting with AIX 7.3 it is not a problem anymore. Python is part of AIX standard distribution. On AIX 7.2 you should install Python RPM package from AIX Toolbox. I wouldn't recommend to use Python 2.7, anything else is suitable for Ansible. Python 3.9 works without any problems.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 5.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Tue August 29, 2023 02:02 PM

    So Ansible is now installed on one of our test AIX lpar running on oslevel 7200-05-04-2220.

    Ansible installation is successfull.

    ataai018(root) /opt/freeware/etc/yum # ansible --version
    ansible 2.7.0
      config file = /etc/ansible/ansible.cfg
      configured module search path = [u'/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
      ansible python module location = /opt/freeware/lib/python2.7/site-packages/ansible
      executable location = /usr/bin/ansible
      python version = 2.7.18 (default, May 31 2021, 11:28:01) [GCC 8.3.0]
    ataai018(root) /opt/freeware/etc/yum #

    ataai018(root) /opt/freeware/etc/yum # ansible-galaxy collection install ibm.power_aix
    - downloading role 'collection', owned by
     [WARNING]: - collection was NOT installed successfully: Content has no field named 'owner'

    ERROR! - you can use --ignore-errors to skip failed roles and finish processing the list.
    ataai018(root) /opt/freeware/etc/yum #
    ataai018(root) /opt/freeware/etc/yum #
    ataai018(root) /opt/freeware/etc/yum # rpm -qa|grep -i python
    python-iniparse-0.4-1.noarch
    python-2.7.18-3.ppc
    python-tools-2.7.18-3.ppc
    python3-3.7.12-1.ppc
    python3-jmespath-0.9.4-1.noarch
    python3-markupsafe-1.1.1-1.ppc
    python3-six-1.13.0-1.noarch
    python-setuptools-0.9.8-2.noarch
    python-six-1.10.0-1.noarch
    python-PyYAML-3.11-1.ppc
    python-pycrypto-2.6.1-1.ppc
    python-babel-0.9.6-1.noarch
    python-httplib2-0.9.2-1.noarch
    python-urlgrabber-3.10.1-1.noarch
    python-pycurl-7.43.0-1.ppc
    python-devel-2.7.18-3.ppc
    python3-jinja2-2.10.3-1.noarch
    python3-pyyaml-5.4.1.1-1.ppc
    python-markupsafe-1.0-1.ppc
    python-pyasn1-0.2.3-1.noarch
    python-keyczar-0.716-1.noarch
    python-paramiko-1.7.6-1.ppc
    python-jinja2-2.10.1-1.noarch
    ataai018(root) /opt/freeware/etc/yum # yum list python
    Installed Packages
    python.ppc                                                            2.7.18-3                                                             @AIX_Toolbox
    ataai018(root) /opt/freeware/etc/yum # yum list python3
    Installed Packages
    python3.ppc                                                            3.7.12-1                                                            @AIX_Toolbox
    ataai018(root) /opt/freeware/etc/yum #

    We have heard this information " Installing collections with ansible-galaxy is only supported in ansible 2.9+"

    It seems we are in late...

    We will try to install    Ansible 7.2.0 from the AIX TOOLBOX...



    ------------------------------
    christophe derouet
    ------------------------------



  • 6.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Tue August 29, 2023 02:57 PM

    Yes, please use Ansible 7.2.0 from AIX Toolbox, not Ansible 2.7.0.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 7.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 04:32 AM

    Hello Andrey,

    If we have a look to the AIX TOOLBOX we can see that the ansible 7.2.0 is available.

    On our AIX test lpar we can see that we are looking for new versions of rpm packages straightly to the IBM site.

    ataai018(root) / # yum -v repolist
    Config time: 0.008
    Yum Version: 3.4.3
    Setting up Package Sacks
    pkgsack time: 0.006
    Repo-id      : AIX_Toolbox
    Repo-name    : AIX generic repository
    Repo-revision: 1692980415
    Repo-updated : Fri Aug 25 18:24:04 2023
    Repo-pkgs    : 3,515
    Repo-size    : 11 G
    Repo-baseurl : anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/
    Repo-expire  : 21,600 second(s) (last: Wed Aug 30 09:58:16 2023)
    Repo-filename: /opt/freeware/etc/yum/yum.conf

    Repo-id      : AIX_Toolbox_72
    Repo-name    : AIX 7.2 specific repository
    Repo-revision: 1692265567
    Repo-updated : Thu Aug 17 11:49:54 2023
    Repo-pkgs    : 604
    Repo-size    : 8.4 G
    Repo-baseurl : anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.2/">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.2/
    Repo-expire  : 21,600 second(s) (last: Wed Aug 30 09:58:16 2023)
    Repo-filename: /opt/freeware/etc/yum/yum.conf

    Repo-id      : AIX_Toolbox_noarch
    Repo-name    : AIX noarch repository
    Repo-revision: 1692973861
    Repo-updated : Fri Aug 25 16:34:51 2023
    Repo-pkgs    : 611
    Repo-size    : 1.1 G
    Repo-baseurl : anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/noarch/">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/noarch/
    Repo-expire  : 21,600 second(s) (last: Wed Aug 30 09:58:16 2023)
    Repo-filename: /opt/freeware/etc/yum/yum.conf

    Repo-id      : rsyslog_v7_nightly
    Repo-name    : Adiscon CentOS-$releasever - nightly packages for ppc
    Repo-revision: 1692918883
    Repo-updated : Fri Aug 25 01:14:43 2023
    Repo-pkgs    : 0
    Repo-size    : 0
    Repo-baseurl : http://rpms.adiscon.com/v8-stable-nightly/epel-8/x86_64/
    Repo-expire  : 21,600 second(s) (last: Wed Aug 30 09:58:16 2023)
    Repo-excluded: 15,493
    Repo-filename: ///opt/freeware/etc/yum/repos.d/rsyslog-nightly.repo

    repolist: 4,730
    ataai018(root) / # yum list ansible
    Available Packages
    ansible.ppc                                                  2.6.2-1                                                AIX_Toolbox
    ansible.noarch                                               7.2.0-1                                                AIX_Toolbox_noarch
    ataai018(root) / # 

    We do not understand why the "yum list ansible" command returns "2.6.2-1" version NOT the expected "7.2.0" version...

    It seems we are missing something...

    We thank you very much for your help,

    Have a nice day,



    ------------------------------
    christophe derouet
    ------------------------------



  • 8.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 05:07 AM

    Hi Christophe,

    you see indeed two versions of Ansible:

    ataai018(root) / # yum list ansible
    Available Packages
    ansible.ppc                                                  2.6.2-1                                                AIX_Toolbox
    ansible.noarch                                               7.2.0-1                                                AIX_Toolbox_noarch

    Many years ago IBM decided to provide Ansible as .noarch package but didn't delete the old RPM package. Now we have both of them. Usually if you issue yum install ansible, the latest version (ansible.noarch) should be installed. If it is not the case in your environment, add noarch to the command:

    yum install ansible.noarch

    Then it should install the correct version.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 9.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 05:16 AM

    We tried to install ansible.noarch but we have the errors below...

    ataai018(root) / # yum list ansible
    Available Packages
    ansible.ppc                                                  2.6.2-1                                                AIX_Toolbox
    ansible.noarch                                               7.2.0-1                                                AIX_Toolbox_noarch
    ataai018(root) / # yum install ansible.noarch
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package ansible.noarch 0:7.2.0-1 will be installed
    --> Processing Dependency: ansible-core >= 2.14.2 for package: ansible-7.2.0-1.noarch
    --> Processing Dependency: python3.9 >= 3.9.16 for package: ansible-7.2.0-1.noarch
    --> Processing Dependency: /opt/freeware/bin/python3.9 for package: ansible-7.2.0-1.noarch
    --> Running transaction check
    ---> Package ansible-core.noarch 0:2.14.2-1 will be installed
    --> Processing Dependency: python3.9-cryptography >= 3.4.7 for package: ansible-core-2.14.2-1.noarch
    --> Processing Dependency: python3.9-jinja2 >= 3.0.3 for package: ansible-core-2.14.2-1.noarch
    --> Processing Dependency: python3.9-packaging >= 19.2 for package: ansible-core-2.14.2-1.noarch
    --> Processing Dependency: python3.9-pyyaml >= 5.4.1.1 for package: ansible-core-2.14.2-1.noarch
    --> Processing Dependency: python3.9-resolvelib >= 0.5.4 for package: ansible-core-2.14.2-1.noarch
    --> Processing Dependency: (ansible >= 7.2.0 if ansible <= 2.9.25) for package: ansible-core-2.14.2-1.noarch
    ---> Package python3.9.ppc 0:3.9.17-1 will be installed
    AIX_Toolbox/filelists_db                                                                                                        | 4.6 MB  00:00:00
    AIX_Toolbox_noarch/filelists_db                                                                                                 | 2.0 MB  00:00:00
    --> Processing Dependency: expat >= 2.5.0 for package: python3.9-3.9.17-1.ppc
    --> Processing Dependency: sqlite >= 3.39.3 for package: python3.9-3.9.17-1.ppc
    --> Processing Dependency: zlib >= 1.2.13 for package: python3.9-3.9.17-1.ppc
    --> Running transaction check
    ---> Package ansible-core.noarch 0:2.14.2-1 will be installed
    --> Processing Dependency: (ansible >= 7.2.0 if ansible <= 2.9.25) for package: ansible-core-2.14.2-1.noarch
    ---> Package expat.ppc 0:2.4.6-1 will be updated
    ---> Package expat.ppc 0:2.5.0-1 will be an update
    ---> Package python3.9-cryptography.ppc 0:3.4.7-4 will be installed
    --> Processing Dependency: python3.9-cffi >= 1.13.2 for package: python3.9-cryptography-3.4.7-4.ppc
    --> Processing Dependency: python3.9-six >= 1.13.0 for package: python3.9-cryptography-3.4.7-4.ppc
    ---> Package python3.9-jinja2.noarch 0:3.0.3-1 will be installed
    --> Processing Dependency: python3.9-markupsafe >= 2.1.2 for package: python3.9-jinja2-3.0.3-1.noarch
    ---> Package python3.9-packaging.noarch 0:19.2-2 will be installed
    --> Processing Dependency: python3.9-pyparsing >= 2.4.4 for package: python3.9-packaging-19.2-2.noarch
    ---> Package python3.9-pyyaml.ppc 0:5.4.1.1-2 will be installed
    ---> Package python3.9-resolvelib.noarch 0:0.5.4-1 will be installed
    ---> Package sqlite.ppc 0:3.37.2-1 will be updated
    ---> Package sqlite.ppc 0:3.41.2-1 will be an update
    ---> Package zlib.ppc 0:1.2.12-1 will be updated
    ---> Package zlib.ppc 0:1.2.13-1 will be an update
    --> Running transaction check
    ---> Package ansible-core.noarch 0:2.14.2-1 will be installed
    --> Processing Dependency: (ansible >= 7.2.0 if ansible <= 2.9.25) for package: ansible-core-2.14.2-1.noarch
    ---> Package python3.9-cffi.ppc 0:1.13.2-2 will be installed
    --> Processing Dependency: python3.9-pycparser >= 2.19-1 for package: python3.9-cffi-1.13.2-2.ppc
    ---> Package python3.9-markupsafe.ppc 0:2.1.2-1 will be installed
    ---> Package python3.9-pyparsing.noarch 0:2.4.4-2 will be installed
    ---> Package python3.9-six.noarch 0:1.13.0-2 will be installed
    --> Running transaction check
    ---> Package ansible-core.noarch 0:2.14.2-1 will be installed
    --> Processing Dependency: (ansible >= 7.2.0 if ansible <= 2.9.25) for package: ansible-core-2.14.2-1.noarch
    ---> Package python3.9-pycparser.noarch 0:2.19-2 will be installed
    --> Finished Dependency Resolution
    Error: Package: ansible-core-2.14.2-1.noarch (AIX_Toolbox_noarch)
               Requires: (ansible >= 7.2.0 if ansible <= 2.9.25)
     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest
    ataai018(root) / #



    ------------------------------
    christophe derouet
    ------------------------------



  • 10.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 05:25 AM

    With yum , now you won't be able to install the new ansible. 
    Please check this thread --> https://community.ibm.com/community/user/power/discussion/important-aix-toolbox-users-please-use-dnf-instead-of-yum?ReturnUrl=%2fcommunity%2fuser%2fpower%2fcommunities%2fcommunity-home%2fdigestviewer%3fcommunitykey%3d10c1d831-47ee-4d92-a138-b03f7896f7c9



    ------------------------------
    Ayappan P
    ------------------------------



  • 11.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 05:34 AM

    Hello Ayappan,

    We thank you very much for this information.

    We will try to migrate to DNF on our AIX test lpar running under oslevel 7200-05-04-2220.

    Will DNF work fine under oslevel 7200-05-04-2220 ?

    Have a nice day,



    ------------------------------
    christophe derouet
    ------------------------------



  • 12.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 05:38 AM

    Yes, it will work. Make sure openssl version 1.1.X.X atleast is installed. 



    ------------------------------
    Ayappan P
    ------------------------------



  • 13.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 09:23 AM

    So now DNF is installed on our AIX test lpar. Installation is successfull.    

    Question N°1:

    I can see the fileset rpm.rte is upgraded.  We will have to downgrade this fileset before migrating to AIX 7.3 for example ? 

    It happened a few years ago when installing YUM. We had to downgrade rpm.rte to the initial level before the next AIX os migration...

    Question N°2:

    The "dnf list ansible" command does not work...    Nor "yum list ansible" command ...

    ataai018(root) /tmp/derouet #
    ataai018(root) /tmp/derouet # lslpp -l rpm.rte
      Fileset                      Level  State      Description
      ----------------------------------------------------------------------------
    Path: /usr/lib/objrepos
      rpm.rte                   4.15.1.3  COMMITTED  RPM Package Manager

    Path: /etc/objrepos
      rpm.rte                   4.15.1.3  COMMITTED  RPM Package Manager
    ataai018(root) /tmp/derouet #
    ataai018(root) /tmp/derouet #


    ataai018(root) /tmp/derouet # ./dnf_aixtoolbox.sh -y
    Attempting download of dnf_bundle_aix_71_72.tar ...
    Saving to 'dnf_bundle_aix_71_72.tar'...
    208 MB received in 21 seconds (9.92 MB/sec)

    Extracting dnf_bundle_aix_71_72.tar ...
    x ca-certificates-2023.2.60-0.aix7.1.ppc.rpm, 991206 bytes, 1936 tape blocks
    x dnf-4.2.17-32_4.aix7.1.noarch.rpm, 11135 bytes, 22 tape blocks
    x dnf-automatic-4.2.17-32_4.aix7.1.noarch.rpm, 12450 bytes, 25 tape blocks
    x dnf-data-4.2.17-32_4.aix7.1.noarch.rpm, 23693 bytes, 47 tape blocks
    x extra_list, 384 bytes, 1 tape blocks
    x install_dnf.sh, 13552 bytes, 27 tape blocks
    x libcomps-0.1.15-32_1.aix7.1.ppc.rpm, 1273688 bytes, 2488 tape blocks
    x libdnf-0.39.1-32_3.aix7.1.ppc.rpm, 15816971 bytes, 30893 tape blocks
    x libmodulemd-1.5.2-32_2.aix7.1.ppc.rpm, 3433754 bytes, 6707 tape blocks
    x librepo-1.11.0-32_2.aix7.1.ppc.rpm, 3653390 bytes, 7136 tape blocks
    x libsmartcols-2.34-32_1.aix7.1.ppc.rpm, 183412 bytes, 359 tape blocks
    x libsolv-0.7.9-32_3.aix7.1.ppc.rpm, 1533540 bytes, 2996 tape blocks
    x libzstd-1.4.4-32_1.aix7.1.ppc.rpm, 469194 bytes, 917 tape blocks
    x p11-kit-0.23.22-0.aix7.1.ppc.rpm, 2148539 bytes, 4197 tape blocks
    x p11-kit-tools-0.23.22-0.aix7.1.ppc.rpm, 274086 bytes, 536 tape blocks
    x python3-3.9.16-0.aix7.1.ppc.rpm, 8920 bytes, 18 tape blocks
    x python3-dateutil-2.8.0-2.aix7.1.noarch.rpm, 6128 bytes, 12 tape blocks
    x python3-devel-3.9.16-0.aix7.1.ppc.rpm, 7699 bytes, 16 tape blocks
    x python3-dnf-4.2.17-32_4.aix7.1.noarch.rpm, 7598 bytes, 15 tape blocks
    x python3-dnf-plugin-migrate-4.0.16-32_2.aix7.1.noarch.rpm, 6568 bytes, 13 tape blocks
    x python3-dnf-plugins-core-4.0.16-32_2.aix7.1.noarch.rpm, 6776 bytes, 14 tape blocks
    x python3-gpg-1.13.1-32_3.aix7.1.ppc.rpm, 7040 bytes, 14 tape blocks
    x python3-hawkey-0.39.1-32_3.aix7.1.ppc.rpm, 23264 bytes, 46 tape blocks
    x python3-idle-3.9.16-0.aix7.1.ppc.rpm, 7283 bytes, 15 tape blocks
    x python3-libcomps-0.1.15-32_1.aix7.1.ppc.rpm, 13360 bytes, 27 tape blocks
    x python3-libdnf-0.39.1-32_3.aix7.1.ppc.rpm, 23264 bytes, 46 tape blocks
    x python3-librepo-1.11.0-32_2.aix7.1.ppc.rpm, 12860 bytes, 26 tape blocks
    x python3-six-1.13.0-2.aix7.1.noarch.rpm, 5820 bytes, 12 tape blocks
    x python3-test-3.9.16-0.aix7.1.ppc.rpm, 6228 bytes, 13 tape blocks
    x python3-tkinter-3.9.16-0.aix7.1.ppc.rpm, 6120 bytes, 12 tape blocks
    x python3.9-3.9.16-0.aix7.1.ppc.rpm, 56782290 bytes, 110903 tape blocks
    x python3.9-dateutil-2.8.0-2.aix7.1.noarch.rpm, 310485 bytes, 607 tape blocks
    x python3.9-devel-3.9.16-0.aix7.1.ppc.rpm, 19947643 bytes, 38961 tape blocks
    x python3.9-dnf-4.2.17-32_4.aix7.1.noarch.rpm, 196779 bytes, 385 tape blocks
    x python3.9-dnf-plugin-migrate-4.0.16-32_2.aix7.1.noarch.rpm, 8242 bytes, 17 tape blocks
    x python3.9-dnf-plugins-core-4.0.16-32_2.aix7.1.noarch.rpm, 33639 bytes, 66 tape blocks
    x python3.9-gpg-1.13.1-32_3.aix7.1.ppc.rpm, 1192531 bytes, 2330 tape blocks
    x python3.9-hawkey-0.39.1-32_3.aix7.1.ppc.rpm, 3116653 bytes, 6088 tape blocks
    x python3.9-idle-3.9.16-0.aix7.1.ppc.rpm, 2328852 bytes, 4549 tape blocks
    x python3.9-libcomps-0.1.15-32_1.aix7.1.ppc.rpm, 1049812 bytes, 2051 tape blocks
    x python3.9-libdnf-0.39.1-32_3.aix7.1.ppc.rpm, 22550948 bytes, 44045 tape blocks
    x python3.9-librepo-1.11.0-32_2.aix7.1.ppc.rpm, 2293000 bytes, 4479 tape blocks
    x python3.9-six-1.13.0-2.aix7.1.noarch.rpm, 45630 bytes, 90 tape blocks
    x python3.9-test-3.9.16-0.aix7.1.ppc.rpm, 33159212 bytes, 64765 tape blocks
    x python3.9-tkinter-3.9.16-0.aix7.1.ppc.rpm, 1162787 bytes, 2272 tape blocks
    x rpm-python3-4.15.1-32_2.aix7.1.ppc.rpm, 9496 bytes, 19 tape blocks
    x rpm-python3.9-4.15.1-32_2.aix7.1.ppc.rpm, 98982 bytes, 194 tape blocks
    x rpm.rte, 43051008 bytes, 84084 tape blocks
    x yum-4.2.17-32_4.aix7.1.noarch.rpm, 8634 bytes, 17 tape blocks
    x zchunk-1.1.4-32_2.aix7.1.ppc.rpm, 554294 bytes, 1083 tape blocks
    x zchunk-devel-1.1.4-32_2.aix7.1.ppc.rpm, 19256 bytes, 38 tape blocks
    x zchunk-libs-1.1.4-32_2.aix7.1.ppc.rpm, 534032 bytes, 1044 tape blocks

    Installing rpm.rte at the latest version ...
    This may take several minutes depending on the number of rpms installed...
    +-----------------------------------------------------------------------------+
                        Pre-installation Verification...
    +-----------------------------------------------------------------------------+
    Verifying selections...done
    Verifying requisites...done
    Results...

    SUCCESSES
    ---------
      Filesets listed in this section passed pre-installation verification
      and will be installed.

      Selected Filesets
      -----------------
      rpm.rte 4.15.1.1011                         # RPM Package Manager

      << End of Success Section >>

    +-----------------------------------------------------------------------------+
                       BUILDDATE Verification ...
    +-----------------------------------------------------------------------------+
    Verifying build dates...done
    FILESET STATISTICS
    ------------------
        1  Selected to be installed, of which:
            1  Passed pre-installation verification
      ----
        1  Total to be installed

    +-----------------------------------------------------------------------------+
                             Installing Software...
    +-----------------------------------------------------------------------------+

    installp: APPLYING software for:
            rpm.rte 4.15.1.1011

    Checking if rpm package is already owning
      some of the libraries and binaries..

    . . . . . << Copyright notice for rpm.rte >> . . . . . . .
     Licensed Materials - Property of IBM

     5765H4000
       Copyright International Business Machines Corp. 2014, 2020-2023.
       Copyright "Cowboy" Ben Alman, 2010.
       Copyright Steven Benner (http://stevenbenner.com/), 2013.
       Copyright The Regents of the University of California, 1990, 1993, 1994.
       Copyright Ralf Corsepius <corsepiu@fedoraproject.org>, 2007.
       Copyright Vasil Dinkov, Vadikom Web Ltd., 2016.
       Copyright The Dojo Foundation, 2011.
       Copyright Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995-1997, 2000-2006.
       Copyright Tom Dyas <tdyas@eden.rutgers.edu>, 1998.
       Copyright W. L. Estes <wlestes@uncg.edu>, 1998.
       Copyright Free Software Foundation, Inc., 1989, 1991-2018.
       Copyright Dave Furfero, 2011-2014.
       Copyright Neal Gompa <ngompa13@gmail.com>, 2015.
       Copyright Dimitri van Heesch, 1997-2017.
       Copyright The Internet Society (1998).
       Copyright Per Oeyvind Karlsen <proyvind@moondrake.org>, 2010.
       Copyright Dmitry V. Levin <ldv@altlinux.org>, 2019.
       Copyright Dan Nicholson <dbn.lists@gmail.com>, 2012-2015.
       Copyright Red Hat, Inc., 1998-2003, 2005, 2007, 2009-2011, 2016-2017.
       Copyright Red Hat Software, 1995-2002.
       Copyright Scott James Remnant <scott@netsplit.com>, 2004.
       Copyright John Resig, 2011.
       Copyright Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>, 2004.
       Copyright System Design and Research, 2003.
       Copyright Julian Seward et al., 2002-2015.
       Copyright Mark J. Wielaard <mark@klomp.org>, 2016, 2019.
       Copyright X Consortium, 1994.

     All rights reserved.
     US Government Users Restricted Rights - Use, duplication or disclosure
     restricted by GSA ADP Schedule Contract with IBM Corp.
    . . . . . << End of copyright notice for rpm.rte >>. . . .

    ##################################################################
      This version of rpm installs files under the path /usr/opt/rpm.
      More detailed information on new changes can be found in
      /usr/opt/rpm/README file.
    ##################################################################

    Please wait...
    Successfully updated the Kernel Authorization Table.
    Successfully updated the Kernel Role Table.
    Successfully updated the Kernel Command Table.
    Successfully updated the Kernel Device Table.
    Successfully updated the Kernel Object Domain Table.
    Successfully updated the Kernel  Domains Table.
    Successfully updated the Kernel RBAC log level.
    Successfully updated the Kernel Authorization Table.
    Successfully updated the Kernel Role Table.
    Successfully updated the Kernel Command Table.
    Successfully updated the Kernel Device Table.
    Successfully updated the Kernel Object Domain Table.
    Successfully updated the Kernel  Domains Table.
    Successfully updated the Kernel RBAC log level.
    Finished processing all filesets.  (Total time:  34 secs).

    +-----------------------------------------------------------------------------+
                                    Summaries:
    +-----------------------------------------------------------------------------+

    Installation Summary
    --------------------
    Name                        Level           Part        Event       Result
    -------------------------------------------------------------------------------
    rpm.rte                     4.15.1.1011     USR         APPLY       SUCCESS
    rpm.rte                     4.15.1.1011     ROOT        APPLY       SUCCESS


    Checking whether any of the rpms from dnf_bundle are already installed...
    Takes couple of minutes to process.

    ca-certificates-2021.2.52-3.ppc will be updated to ca-certificates-2023.2.60-0
    dnf-4.2.17-32_4 will be installed
    dnf-automatic-4.2.17-32_4 will be installed
    dnf-data-4.2.17-32_4 will be installed
    libcomps-0.1.15-32_1 will be installed
    libdnf-0.39.1-32_3 will be installed
    libmodulemd-1.5.2-32_2 will be installed
    librepo-1.11.0-32_2 will be installed
    libsmartcols-2.34-32_1 will be installed
    libsolv-0.7.9-32_3 will be installed
    libzstd-1.4.4-32_1 will be installed
    Skipping p11-kit-0.23.22-0 as higher version p11-kit-0.23.22-1.ppc is installed.
    Skipping p11-kit-tools-0.23.22-0 as higher version p11-kit-tools-0.23.22-1.ppc is installed.
    python3-3.7.12-1.ppc will be updated to python3-3.9.16-0
    python3-dateutil-2.8.0-2 will be installed
    python3-dnf-4.2.17-32_4 will be installed
    python3-dnf-plugin-migrate-4.0.16-32_2 will be installed
    python3-dnf-plugins-core-4.0.16-32_2 will be installed
    python3-gpg-1.13.1-32_3 will be installed
    python3-hawkey-0.39.1-32_3 will be installed
    python3-libcomps-0.1.15-32_1 will be installed
    python3-libdnf-0.39.1-32_3 will be installed
    python3-librepo-1.11.0-32_2 will be installed
    python3-six-1.13.0-1.noarch will be updated to python3-six-1.13.0-2
    python3.9-3.9.16-0 will be installed
    python3.9-dateutil-2.8.0-2 will be installed
    python3.9-dnf-4.2.17-32_4 will be installed
    python3.9-dnf-plugin-migrate-4.0.16-32_2 will be installed
    python3.9-dnf-plugins-core-4.0.16-32_2 will be installed
    python3.9-gpg-1.13.1-32_3 will be installed
    python3.9-hawkey-0.39.1-32_3 will be installed
    python3.9-libcomps-0.1.15-32_1 will be installed
    python3.9-libdnf-0.39.1-32_3 will be installed
    python3.9-librepo-1.11.0-32_2 will be installed
    python3.9-six-1.13.0-2 will be installed
    rpm-python3-4.15.1-32_2 will be installed
    rpm-python3.9-4.15.1-32_2 will be installed
    yum-3.4.3-8.noarch will be updated to yum-4.2.17-32_4
    zchunk-libs-1.1.4-32_2 will be installed

    Installing the packages...

    Verifying...                          ################################# [100%]
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:python3.9-3.9.16-0               ################################# [  2%]
       2:python3-3.9.16-0                 ################################# [  5%]
       3:libzstd-1.4.4-32_1               ################################# [  7%]
       4:libmodulemd-1.5.2-32_2           ################################# [ 10%]
       5:libsolv-0.7.9-32_3               ################################# [ 12%]
       6:rpm-python3.9-4.15.1-32_2        ################################# [ 15%]
       7:libsmartcols-2.34-32_1           ################################# [ 17%]
       8:zchunk-libs-1.1.4-32_2           ################################# [ 20%]
       9:librepo-1.11.0-32_2              ################################# [ 22%]
      10:libdnf-0.39.1-32_3               ################################# [ 24%]
      11:python3.9-libdnf-0.39.1-32_3     ################################# [ 27%]
      12:python3.9-hawkey-0.39.1-32_3     ################################# [ 29%]
      13:python3.9-dateutil-2.8.0-2       ################################# [ 32%]
      14:python3.9-gpg-1.13.1-32_3        ################################# [ 34%]
      15:dnf-data-4.2.17-32_4             ################################# [ 37%]
      16:python3.9-librepo-1.11.0-32_2    ################################# [ 39%]
      17:python3.9-six-1.13.0-2           ################################# [ 41%]
      18:libcomps-0.1.15-32_1             ################################# [ 44%]
      19:python3.9-libcomps-0.1.15-32_1   ################################# [ 46%]
      20:python3.9-dnf-4.2.17-32_4        ################################# [ 49%]
      21:python3.9-dnf-plugins-core-4.0.16################################# [ 51%]
      22:python3.9-dnf-plugin-migrate-4.0.################################# [ 54%]
      23:python3-dnf-4.2.17-32_4          ################################# [ 56%]
      24:dnf-4.2.17-32_4                  ################################# [ 59%]
      25:dnf-automatic-4.2.17-32_4        ################################# [ 61%]

    This version of yum4 is a soft link to dnf and all the yum commands are dnf commands.
    Repositories present in yum.conf is being used for dnf.


    Trying to create pkg_yumdb database required for migrate plugin
    Successfully created pkg_yumdb database
      26:yum-4.2.17-32_4                  ################################# [ 63%]
      27:python3-dnf-plugin-migrate-4.0.16################################# [ 66%]
      28:python3-dnf-plugins-core-4.0.16-3################################# [ 68%]
      29:python3-libcomps-0.1.15-32_1     ################################# [ 71%]
      30:python3-six-1.13.0-2             ################################# [ 73%]
      31:python3-librepo-1.11.0-32_2      ################################# [ 76%]
      32:python3-gpg-1.13.1-32_3          ################################# [ 78%]
      33:python3-dateutil-2.8.0-2         ################################# [ 80%]
      34:python3-hawkey-0.39.1-32_3       ################################# [ 83%]
      35:python3-libdnf-0.39.1-32_3       ################################# [ 85%]
      36:rpm-python3-4.15.1-32_2          ################################# [ 88%]
      37:ca-certificates-2023.2.60-0      ################################# [ 90%]
    Cleaning up / removing...
      38:python3-six-1.13.0-1             ################################# [ 93%]
      39:python3-3.7.12-1                 ################################# [ 95%]
      40:yum-3.4.3-8                      warning: /opt/freeware/etc/yum/yum.conf saved as /opt/freeware/e                                      tc/yum/yum.conf.rpmsave
    ################################# [ 98%]
      41:ca-certificates-2021.2.52-3      ################################# [100%]

    dnf installed successfully.
    Please run 'dnf update' to update packages to the latest level.

    Please note, RPM packages are downloaded in dnf cache /var/cache/dnf.
    RPM packages install files go under the path /opt.
    Hence it is recommended to always keep at least 512MB of free space in /var & /opt
    to avoid any download and installation/update failures.

    Trying to run 'dnf migrate' to migrate yum database to dnf.
    AIX generic repository                                                8.1 MB/s |  19 MB     00:02
    AIX noarch repository                                                 4.4 MB/s | 2.8 MB     00:00
    AIX 7.2 specific repository                                           3.0 MB/s | 1.3 MB     00:00
    Adiscon CentOS-7.2.5.103 - nightly packages for AIX                   1.4 MB/s | 5.8 MB     00:04
    Last metadata expiration check: 0:00:01 ago on Wed Aug 30 14:50:55 2023.
    Migrating history data...
    ataai018(root) /tmp/derouet #
    ataai018(root) /tmp/derouet #
    ataai018(root) /tmp/derouet #
    ataai018(root) /tmp/derouet # dnf list ansible
    ksh: dnf:  not found.
    ataai018(root) /tmp/derouet # yum list ansible
    ksh: yum:  not found.
    ataai018(root) /tmp/derouet #



    ------------------------------
    christophe derouet
    ------------------------------



  • 14.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 09:31 AM

    But this syntax works. Thanks to my colleague Nicolas !

    taai018(root) /opt/freeware/bin # ./dnf list ansible
    Last metadata expiration check: 0:37:25 ago on Wed Aug 30 14:50:55 CEST 2023.
    Available Packages
    ansible.ppc                                                     2.6.2-1                                                   AIX_Toolbox
    ansible.noarch                                                  7.2.0-1                                                   AIX_Toolbox_noarch
    ataai018(root) /opt/freeware/bin #



    ------------------------------
    christophe derouet
    ------------------------------



  • 15.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 09:44 AM

    Now Ansible is installed. But the "ansible --version" command fails...

    ataai018(root) /opt/freeware/bin # ./dnf install ansible
    Last metadata expiration check: 0:40:38 ago on Wed Aug 30 14:50:55 CEST 2023.
    Dependencies resolved.
    ============================================================================================================================================
     Package                                  Architecture             Version                       Repository                            Size
    ============================================================================================================================================
    Installing:
     ansible                                  noarch                   7.2.0-1                       AIX_Toolbox_noarch                    47 M
    Installing dependencies:
     python3.9-cffi                           ppc                      1.13.2-2                      AIX_Toolbox                          445 k
     python3.9-cryptography                   ppc                      3.4.7-4                       AIX_Toolbox                          938 k
     python3.9-markupsafe                     ppc                      2.1.2-1                       AIX_Toolbox                           32 k
     python3.9-pyyaml                         ppc                      5.4.1.1-2                     AIX_Toolbox                          507 k
     ansible-core                             noarch                   2.14.2-1                      AIX_Toolbox_noarch                   3.5 M
     python3.9-jinja2                         noarch                   3.0.3-1                       AIX_Toolbox_noarch                   314 k
     python3.9-packaging                      noarch                   19.2-2                        AIX_Toolbox_noarch                    58 k
     python3.9-pycparser                      noarch                   2.19-2                        AIX_Toolbox_noarch                   241 k
     python3.9-pyparsing                      noarch                   2.4.4-2                       AIX_Toolbox_noarch                   196 k
     python3.9-resolvelib                     noarch                   0.5.4-1                       AIX_Toolbox_noarch                    30 k

    Transaction Summary
    ============================================================================================================================================
    Install  11 Packages

    Total download size: 54 M
    Installed size: 317 M
    Is this ok [y/N]: y
    Downloading Packages:
    (1/11): python3.9-markupsafe-2.1.2-1.aix7.1.ppc.rpm                                                         153 kB/s |  32 kB     00:00
    (2/11): python3.9-cffi-1.13.2-2.aix7.1.ppc.rpm                                                              1.3 MB/s | 445 kB     00:00
    (3/11): python3.9-pyyaml-5.4.1.1-2.aix7.1.ppc.rpm                                                           3.7 MB/s | 507 kB     00:00
    (4/11): python3.9-cryptography-3.4.7-4.aix7.1.ppc.rpm                                                       2.3 MB/s | 938 kB     00:00
    (5/11): python3.9-jinja2-3.0.3-1.aix7.1.noarch.rpm                                                          4.7 MB/s | 314 kB     00:00
    (6/11): python3.9-packaging-19.2-2.aix7.1.noarch.rpm                                                        1.3 MB/s |  58 kB     00:00
    (7/11): python3.9-pycparser-2.19-2.aix7.1.noarch.rpm                                                        5.2 MB/s | 241 kB     00:00
    (8/11): python3.9-pyparsing-2.4.4-2.aix7.1.noarch.rpm                                                       4.2 MB/s | 196 kB     00:00
    (9/11): python3.9-resolvelib-0.5.4-1.aix7.1.noarch.rpm                                                      1.3 MB/s |  30 kB     00:00
    (10/11): ansible-core-2.14.2-1.aix7.1.noarch.rpm                                                            9.4 MB/s | 3.5 MB     00:00
    (11/11): ansible-7.2.0-1.aix7.1.noarch.rpm                                                                  9.3 MB/s |  47 MB     00:05
    --------------------------------------------------------------------------------------------------------------------------------------------
    Total                                                                                                       9.9 MB/s |  54 MB     00:05
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                                                                                    1/1
      Installing       : python3.9-resolvelib-0.5.4-1.noarch                                                                               1/11
      Installing       : python3.9-pyparsing-2.4.4-2.noarch                                                                                2/11
      Installing       : python3.9-packaging-19.2-2.noarch                                                                                 3/11
      Installing       : python3.9-pycparser-2.19-2.noarch                                                                                 4/11
      Installing       : python3.9-cffi-1.13.2-2.ppc                                                                                       5/11
      Installing       : python3.9-cryptography-3.4.7-4.ppc                                                                                6/11
      Installing       : python3.9-pyyaml-5.4.1.1-2.ppc                                                                                    7/11
      Installing       : python3.9-markupsafe-2.1.2-1.ppc                                                                                  8/11
      Installing       : python3.9-jinja2-3.0.3-1.noarch                                                                                   9/11
      Installing       : ansible-7.2.0-1.noarch                                                                                           10/11
      Installing       : ansible-core-2.14.2-1.noarch                                                                                     11/11
      Running scriptlet: ansible-core-2.14.2-1.noarch                                                                                     11/11

     Ansible (2.14.0 onwards) requires the locale encoding to be UTF-8.
     For more information, please refer https://github.com/ansible/ansible/blob/stable-2.14/changelogs/CHANGELOG-v2.14.rst#id22


      Verifying        : python3.9-cffi-1.13.2-2.ppc                                                                                       1/11
      Verifying        : python3.9-cryptography-3.4.7-4.ppc                                                                                2/11
      Verifying        : python3.9-markupsafe-2.1.2-1.ppc                                                                                  3/11
      Verifying        : python3.9-pyyaml-5.4.1.1-2.ppc                                                                                    4/11
      Verifying        : ansible-7.2.0-1.noarch                                                                                            5/11
      Verifying        : ansible-core-2.14.2-1.noarch                                                                                      6/11
      Verifying        : python3.9-jinja2-3.0.3-1.noarch                                                                                   7/11
      Verifying        : python3.9-packaging-19.2-2.noarch                                                                                 8/11
      Verifying        : python3.9-pycparser-2.19-2.noarch                                                                                 9/11
      Verifying        : python3.9-pyparsing-2.4.4-2.noarch                                                                               10/11
      Verifying        : python3.9-resolvelib-0.5.4-1.noarch                                                                              11/11

    Installed:
      ansible-7.2.0-1.noarch                        python3.9-cffi-1.13.2-2.ppc                    python3.9-cryptography-3.4.7-4.ppc
      python3.9-markupsafe-2.1.2-1.ppc              python3.9-pyyaml-5.4.1.1-2.ppc                 ansible-core-2.14.2-1.noarch
      python3.9-jinja2-3.0.3-1.noarch               python3.9-packaging-19.2-2.noarch              python3.9-pycparser-2.19-2.noarch
      python3.9-pyparsing-2.4.4-2.noarch            python3.9-resolvelib-0.5.4-1.noarch

    Complete!
    ataai018(root) /opt/freeware/bin # ansible --version
    ksh: ansible: 0403-006 Execute permission denied.
    ataai018(root) /opt/freeware/bin # 



    ------------------------------
    christophe derouet
    ------------------------------



  • 16.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 10:18 AM

    Hi Christophe,

    great that you were able to install Ansible! I think since two years IBM don't do anymore symlinks in /usr/bin. This is the reason for your problem calling yum/dnf. Update your PATH variable and add /opt/freeware/bin to the end of it or use full qualified names like /opt/freeware/bin/dnf.

    The same should apply to ansible command. Please check with the full name - /opt/freeware/bin/ansible --version - if it works.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 17.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 10:24 AM

    Hello Andrey,

    It returns the message below...

    ataai018(root) /opt/freeware/bin # /opt/freeware/bin/ansible --version
    ERROR: Ansible requires the locale encoding to be UTF-8; Detected ISO8859-1.
    ataai018(root) /opt/freeware/bin #



    ------------------------------
    christophe derouet
    ------------------------------



  • 18.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Wed August 30, 2023 10:53 AM

    Hi Christophe,

    awesome! This is good because it is a known requirement of the new Ansible. Check that you have UTF-8 packages installed on the system:

    # lslpp -L bos.loc.*
      Fileset                      Level  State  Type  Description (Uninstaller)
      ----------------------------------------------------------------------------
      bos.loc.com.utf            7.3.1.0    C     F    Common Locale Support - UTF-8 
      bos.loc.iso.en_US          7.3.1.0    C     F    Base System Locale ISO Code
                                                       Set - U.S. English 
      bos.loc.utf.EN_US          7.3.1.0    C     F    Base System Locale UTF Code
                                                       Set - U. S. English 
    

    This is the output from AIX 7.3, but for AIX 7.2 it should be similar. Only LPP versions are different.

    If you don't have the packages, install them from AIX ISO image or NIM.

    Check locale -a output that UTF-8 locales are available on your system:

    # locale -a
    C
    POSIX
    EN_US.UTF-8
    EN_US
    en_US.8859-15
    en_US.IBM-858
    en_US.ISO8859-1
    en_US.UTF-8
    en_US
    

    If you have them set LANG to en_US.UTF-8 and you can repeat the command:

    # echo $LANG
    C
    # /opt/freeware/bin/ansible --version
    ERROR: Ansible requires the locale encoding to be UTF-8; Detected None.
    # export LANG=en_US.UTF-8
    # /opt/freeware/bin/ansible --version
    ansible [core 2.14.2]
      config file = /etc/ansible/ansible.cfg
      configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
      ansible python module location = /opt/freeware/lib/python3.9/site-packages/ansible
      ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
      executable location = /opt/freeware/bin/ansible
      python version = 3.9.17 (main, Jul  5 2023, 06:17:22) [GCC 10.3.0] (/opt/freeware/bin/python3.9)
      jinja version = 3.1.2
      libyaml = True
    


    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 19.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 04:35 AM

    Hello Andrey,

    The following filesets have been installed as required. Then a reboot of our test AIX lpar has been done.

    ataai018(root) / #
    ataai018(root) / # lslpp -L bos.loc.*
      Fileset                      Level  State  Type  Description (Uninstaller)
      ----------------------------------------------------------------------------
      bos.loc.com.utf            7.2.4.0    C     F    Common Locale Support - UTF-8
      bos.loc.iso.en_US          7.2.5.0    C     F    Base System Locale ISO Code
                                                       Set - U.S. English
      bos.loc.utf.EN_US          7.2.5.0    C     F    Base System Locale UTF Code
                                                       Set - U. S. English

    UTF-8 locale are now available. After the reboot it seems that LANG was set automatically  to UTF-8...

    ataai018(root) / #
    ataai018(root) / # locale -a
    C
    POSIX
    EN_US.UTF-8
    EN_US
    en_US.8859-15
    en_US.IBM-858
    en_US.ISO8859-1
    en_US.UTF-8
    en_US
    ataai018(root) / # echo $LANG
    en_US.UTF-8
    ataai018(root) / #

    Now the "ansible --version" works perfectly !!!

    So we are very happy and we thank you very much for your help.

    root@ataai018:/home/derouet#ansible --version
    ansible [core 2.14.2]
      config file = /etc/ansible/ansible.cfg
      configured module search path = ['/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
      ansible python module location = /opt/freeware/lib/python3.9/site-packages/ansible
      ansible collection location = /.ansible/collections:/usr/share/ansible/collections
      executable location = /opt/freeware/bin/ansible
      python version = 3.9.16 (main, Jun 28 2023, 12:45:03) [GCC 8.3.0] (/opt/freeware/bin/python3.9)
      jinja version = 3.0.3
      libyaml = True
    root@ataai018:/home/derouet#

    We will try to execute a playbook from our test controler node (our lpar ataai018) to another test AIX lpar.

    Please i have two more questions :

    We had to update the fileset rpm.rte from "4.15.1.3" to "4.15.1.1011". Will we have troubles when migration our AIX partition ataai018 from AIX oslevel 7.2 to 7.3 for example ?  A few years ago, we had to downgrade the rpm.rte before upgrading the operating system to the next level. The rpm.rte fileset has been updated as a requirement for yum installation.

    We have to work with LANG=en_US.UTF-8 on our test AIX lpar. It is our test controler node.

    Is it a requirement for ansible client partitions ?

    What can be the impact if we install Ansible on our production NIM master lpar ? Do we have to worry about this point ?

    We thank you very much for your help,

    Have a nice day,



    ------------------------------
    christophe derouet
    ------------------------------



  • 20.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 04:55 AM

    Hi Christophe,

    regarding RPM fileset I think only IBM could answer the question. @Ayappan P, @Jan Harris do you know something about the problem?

    regarding UTF-8 locale. No, you don't need to have it permanently on the server or clients. First of all I would recommend to create a special user for Ansible. In this case you can set locale just for this user. If you want to use Ansible under another user, you can always temporary set LANG variable to en_US.UTF-8 and call Ansible commands or write some small wrapper script. I hope IBM will fix it in the next release.

    Client LPARs can have any locale. Usually you don't need to change anything there.

    NIM server is my personal favourite place to install Ansible. It usually has connections to all AIX LPARs and it has always the newest AIX version. I also place copies of AIX Toolbox repos on the NIM server.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 21.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 05:10 AM
    Edited by christophe derouet Thu August 31, 2023 05:10 AM

    About rpm.rte fileset, IBM case TS003271766 was created.



    ------------------------------
    christophe derouet
    ------------------------------



  • 22.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 05:24 AM

    I had a look to my old messages and found a discussion with Sangamesh.



    ------------------------------
    christophe derouet
    ------------------------------



  • 23.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 05:38 AM

    Andrey,

    We tried to install collections with ansible-galaxy...   Something wrong with our SSL certificate ?

    root@ataai018:/tmp#ansible --version
    ansible [core 2.14.2]
      config file = /etc/ansible/ansible.cfg
      configured module search path = ['/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
      ansible python module location = /opt/freeware/lib/python3.9/site-packages/ansible
      ansible collection location = /.ansible/collections:/usr/share/ansible/collections
      executable location = /opt/freeware/bin/ansible
      python version = 3.9.16 (main, Jun 28 2023, 12:45:03) [GCC 8.3.0] (/opt/freeware/bin/python3.9)
      jinja version = 3.0.3
      libyaml = True


    root@ataai018:/tmp#ansible-galaxy collection install ibm.power_aix
    Starting galaxy collection install process
    Process install dependency map
    [WARNING]: Skipping Galaxy server https://galaxy.ansible.com. Got an unexpected error when getting available versions of collection ibm.power_aix:
    Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': SSL validation is not available in your version of python. You can
    use validate_certs=False, however this is unsafe and not recommended
    ERROR! Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': SSL validation is not available in your version of python. You can use validate_certs=False, however this is unsafe and not recommended
    root@ataai018:/tmp#
    root@ataai018:/tmp#



    ------------------------------
    christophe derouet
    ------------------------------



  • 24.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 06:07 AM

    Hi Christophe,

    sorry, I don't know your environment. If you have a proxy server with SSL certificate inspection, then yes, the problem is on your side.

    The easiest solution is to skip certificate validation.

    The correct solution is to install your company's corporate certificate in SSL certificate store.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 25.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 09:44 AM

    I am sorry for this stupid question but where do i have to add the parameter    validate_certs: false

    I tried in the ansible.cfg [defaults] chapter. And [galaxy] chapter. With no results...

    I have seen it can be added to a playbook, but i have no playbook yet...

    When an update is done on the file ansible.cfg, do we have to do a refresh ? I suppose the answer is no...



    ------------------------------
    christophe derouet
    ------------------------------



  • 26.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 10:24 AM

    There are no stupid questions. 

    You can use -c option to ansible-galaxy:

    ansible-galaxy collection install ibm.power_aix -f -c
    

    or you can add it in ansible.cfg - either in global /etc/ansible/ansible.cfg or in your local project directory.

    # cat ansible.cfg
    [defaults]
    inventory = hosts3
    nocows=true
    stdout_callback=ansible.posix.debug
    callbacks_enabled=ansible.posix.profile_tasks, ansible.posix.timer 
    
    [galaxy]
    ignore_certs=yes
    

    You can check if it is read by using ansible-config command. 

    # ansible-config view
    [defaults]
    inventory = hosts3
    nocows=true
    stdout_callback=ansible.posix.debug
    callbacks_enabled=ansible.posix.profile_tasks, ansible.posix.timer 
    
    [galaxy]
    ignore_certs=yes
    
    # ansible-config dump | grep -i cert
    GALAXY_IGNORE_CERTS(/root/a/ansible.cfg) = True
    

    You don't need any refresh, ansible-galaxy should read the file during start.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 27.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 10:56 AM

    Hello Andrey,

    I am sorry i thing we are missing something...

    ataai018(root) /opt/freeware/bin # ./ansible-config view | grep certs
    ;ignore_certs=yes
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin # ./ansible-galaxy collection install ibm.power_aix
    Starting galaxy collection install process
    Process install dependency map
    [WARNING]: Skipping Galaxy server https://galaxy.ansible.com. Got an unexpected error when getting available versions of collection ibm.power_aix: Unknown error when
    attempting to call Galaxy at 'https://galaxy.ansible.com/api/': SSL validation is not available in your version of python. You can use validate_certs=False, however
    this is unsafe and not recommended
    ERROR! Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': SSL validation is not available in your version of python. You can use validate_certs=False, however this is unsafe and not recommended
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin # ## ansible-config dump | grep -i cert
    ataai018(root) /opt/freeware/bin # ./ansible-config dump | grep -i cert
    GALAXY_IGNORE_CERTS(default) = None
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin #

    As you can see from the "ansible-config dump" command we do not have the expected result...



    ------------------------------
    christophe derouet
    ------------------------------



  • 28.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 11:01 AM

    Hi Christophe,

    as I see from your ansible-config view output:

    ataai018(root) /opt/freeware/bin # ./ansible-config view | grep certs
    ;ignore_certs=yes

    you have semicolon (;) before the option. Try to remove it from your config.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 29.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 11:08 AM

    It is OK we have now the expected result from the "ansible-config dump" command.

    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin # /opt/freeware/bin/ansible-config dump | grep -i cert
    GALAXY_IGNORE_CERTS(/etc/ansible/ansible.cfg) = True
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin #


    ataai018(root) /opt/freeware/bin # ./ansible-galaxy collection install ibm.power_aix
    Starting galaxy collection install process
    Process install dependency map
    [WARNING]: Skipping Galaxy server https://galaxy.ansible.com. Got an unexpected error when getting available versions of collection ibm.power_aix: Unknown error when
    attempting to call Galaxy at 'https://galaxy.ansible.com/api/': <urlopen error unknown url type: https>
    ERROR! Unknown error when attempting to call Galaxy at 'https://galaxy.ansible.com/api/': <urlopen error unknown url type: https>
    ataai018(root) /opt/freeware/bin #
    ataai018(root) /opt/freeware/bin #



    ------------------------------
    christophe derouet
    ------------------------------



  • 30.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 11:20 AM

    OK, now you have a real problem (c). Can you please do the following:

    # /opt/freeware/bin/python3.9
    >>> import urllib3
    >>> urllib3.__version__
    '2.0.4'
    >>> http = urllib3.PoolManager()
    >>> url = 'http://www.google.com'
    >>> resp = http.request('GET', url)
    >>> resp.status
    200
    >>> url = 'https://www.google.com'
    >>> resp = http.request('GET', url)
    >>> resp.status
    200
    

    Thank you!



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 31.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Thu August 31, 2023 12:20 PM
    Edited by christophe derouet Thu August 31, 2023 12:20 PM

    ataai018(root) /opt/freeware/bin # /opt/freeware/bin/python3.9
    Python 3.9.16 (main, Jun 28 2023, 12:45:03)
    [GCC 8.3.0] on aix
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import urllib3
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'urllib3'
    >>> urllib3.__version__
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    NameError: name 'urllib3' is not defined
    >>>



    ------------------------------
    christophe derouet
    ------------------------------



  • 32.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Mon September 04, 2023 09:54 AM

    Hello Andrey,

    Do we have to install the rpm package below ? It seems we are missing urrlib3 module...

    ataai018(root) /opt/freeware/bin # ./dnf list python3.9-urllib3
    Last metadata expiration check: 0:10:55 ago on September  4, 2023 at 03:35:22 PM CEST.
    Available Packages
    python3.9-urllib3.noarch                                                             1.26.7-2                                                              AIX_Toolbox_noarch
    ataai018(root) /opt/freeware/bin #

    On another hand, our very first playbook ran successfully !

    ataai018(root) /opt/freeware/etc/ansible/roles # /opt/freeware/bin/ansible-playbook aix_oslevel_check.yml

    PLAY [AIX oslevel checking playbook] ****************************************************************************************************************************************

    TASK [Gathering Facts] ******************************************************************************************************************************************************
    [WARNING]: Platform aix on host ataai019 is using the discovered Python interpreter at /usr/bin/python3, but future installation of another Python interpreter could change
    the meaning of that path. See https://docs.ansible.com/ansible-core/2.14/reference_appendices/interpreter_discovery.html for more information.
    ok: [ataai019]
    [WARNING]: Platform aix on host ataai017 is using the discovered Python interpreter at /usr/bin/python3, but future installation of another Python interpreter could change
    the meaning of that path. See https://docs.ansible.com/ansible-core/2.14/reference_appendices/interpreter_discovery.html for more information.
    ok: [ataai017]

    TASK [Gather LPP Facts] *****************************************************************************************************************************************************
    changed: [ataai019]
    changed: [ataai017]

    TASK [Print the oslevel] ****************************************************************************************************************************************************
    ok: [ataai017] => {
        "msg": "ataai017 has the AIX oslevel of 7200-05-04-2220"
    }
    ok: [ataai019] => {
        "msg": "ataai019 has the AIX oslevel of 7200-05-04-2220"
    }

    PLAY RECAP ******************************************************************************************************************************************************************
    ataai017                   : ok=3    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
    ataai019                   : ok=3    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

    ataai018(root) /opt/freeware/etc/ansible/roles #

    Have a nice day,



    ------------------------------
    christophe derouet
    ------------------------------



  • 33.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Mon September 04, 2023 12:10 PM

    Hi Christophe,

    I am very glad that you could run your first playbook. It means Ansible works. The only command that doesn't work is ansible-galaxy and it is not the biggest issue.

    First of all, you don't need to install anything addtional. It is my fault and Ansible uses another library.

    Second, the error message shows that you have some incompatibility between Python and OpenSSL. Usually you need update either OpenSSL or Python, or do something similar to fix it. Because I don't have access to your environment, I can't help you with the issue further. I am not part of IBM and even if would be IBM doesn't provide support for open source packages more than in this forum.

    Third, if you need ibm.power_aix or any other collection, you can manually go to https://galaxy.ansible.com, find it there (https://galaxy.ansible.com/ibm/power_aix), and download the tarball. The tarball can be installed the same way - ansible-galaxy collection install ibm*tar.gz. This is the reason why I wouldn't even bother about the problem downloading collections.



    ------------------------------
    Andrey Klyachkin

    https://www.power-devops.com
    ------------------------------



  • 34.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Tue September 05, 2023 03:56 AM

    Hello Andrey,

    I thought "ansible-galaxy" collection was mandatory when working on AIX partitions...

    Would you recommend to install it anyway ? 

    We will try to install fixes and maybe upgrade the OS level of our AIX partitions under the control of ANSIBLE.

    In that case is "ansible-galaxy" collection requested ?

    We thank you very much for your help.

    Have a nice day,



    ------------------------------
    christophe derouet
    ------------------------------



  • 35.  RE: Ansible for AIX system adminitrators / Help for beginners please !

    Posted Tue September 05, 2023 10:59 AM

    Hello Andrey,

    Good news ibm.power_aix:1.6.4 was installed successfully ! Now i have to learn what i can do with this "galaxy collection !!!

    ataai018(root) / # /opt/freeware/bin/ansible-galaxy collection install /tmp/derouet/ibm-power_aix-1.6.4.tar.gz
    Starting galaxy collection install process
    Process install dependency map
    Starting collection install process
    Installing 'ibm.power_aix:1.6.4' to '/.ansible/collections/ansible_collections/ibm/power_aix'
    ibm.power_aix:1.6.4 was installed successfully
    ataai018(root) / #
    ataai018(root) / #



    ------------------------------
    christophe derouet
    ------------------------------