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
  • 1.  Installing Ansible AWX on AIX 7.2

    Posted Wed April 28, 2021 07:16 AM
    Hello,

    I have decided that I perform a clean install with latest IBM Toolbox packages etc....

    So, I got first problem in installation where I dont know why instead of yum ansible expect svr4pkg on AIX?

    TASK [update all packages] *****************************************************
    fatal: [localhost]: FAILED! => {"ansible_facts": {"pkg_mgr": "svr4pkg"}, "changed": false, "msg": "value of state must be one of: present, absent, got: latest"}

    Can you reproduce this bug? Ay hint how to fix it for the future?

    Regards,

    B.





    #AIXOpenSource


  • 2.  RE: Installing Ansible AWX on AIX 7.2

    Posted Wed April 28, 2021 07:45 AM
    Hi,

    I have checked python script which is gathering facts on the beginning, he is detecting svr4pkg because its last pkg manager he found, yum is first..

    PKG_MGRS = [{'path': '/usr/bin/yum', 'name': 'yum'},
                {'path': '/usr/bin/dnf', 'name': 'dnf'},
                {'path': '/usr/bin/apt-get', 'name': 'apt'},
                {'path': '/usr/bin/zypper', 'name': 'zypper'},
                {'path': '/usr/sbin/urpmi', 'name': 'urpmi'},
                {'path': '/usr/bin/pacman', 'name': 'pacman'},
                {'path': '/bin/opkg', 'name': 'opkg'},
                {'path': '/usr/pkg/bin/pkgin', 'name': 'pkgin'},
                {'path': '/opt/local/bin/pkgin', 'name': 'pkgin'},
                {'path': '/opt/tools/bin/pkgin', 'name': 'pkgin'},
                {'path': '/opt/local/bin/port', 'name': 'macports'},
                {'path': '/usr/local/bin/brew', 'name': 'homebrew'},
                {'path': '/sbin/apk', 'name': 'apk'},
                {'path': '/usr/sbin/pkg', 'name': 'pkgng'},
                {'path': '/usr/sbin/swlist', 'name': 'swdepot'},
                {'path': '/usr/bin/emerge', 'name': 'portage'},
                {'path': '/usr/sbin/pkgadd', 'name': 'svr4pkg'}, <<<< /usr/sbin/pkgadd  exist so he choose svr4pkg instead of yum
                {'path': '/usr/bin/pkg', 'name': 'pkg5'},
                {'path': '/usr/bin/xbps-install', 'name': 'xbps'},
                {'path': '/usr/local/sbin/pkg', 'name': 'pkgng'},
                {'path': '/usr/bin/swupd', 'name': 'swupd'},
                {'path': '/usr/sbin/sorcery', 'name': 'sorcery'},
                {'path': '/usr/bin/rpm-ostree', 'name': 'atomic_container'},
                {'path': '/usr/bin/installp', 'name': 'installp'},
                ]
    ....


    Workaroud is:
    - remove line " {'path': '/usr/sbin/pkgadd', 'name': 'svr4pkg'}" from  pkg_mgr.py (tested, its installing now...)
    - or probably editing playbook and add: "use_backend: yum" should also help but I dont want to do it for every playbook in the future

    Can you maybe provide me better solution which dont involve editing config files? (I am not familiar with ansible so far....)

    Regards,
    B.


    On Wed, Apr 28, 2021 at 1:15 PM maesho maesho <maeshopo@gmail.com> wrote:
    Hello,

    I have decided that I perform a clean install with latest IBM Toolbox packages etc....

    So, I got first problem in installation where I dont know why instead of yum ansible expect svr4pkg on AIX?

    TASK [update all packages] *****************************************************
    fatal: [localhost]: FAILED! => {"ansible_facts": {"pkg_mgr": "svr4pkg"}, "changed": false, "msg": "value of state must be one of: present, absent, got: latest"}

    Can you reproduce this bug? Ay hint how to fix it for the future?

    Regards,

    B.









  • 3.  RE: Installing Ansible AWX on AIX 7.2

    Posted Wed April 28, 2021 08:13 AM
    Hello,

    aws installation playbook finished OK but I see only nginx test page when tryning http://<server_ip>

    root@utaxanst:/tmp/awsinstall/awx-install # ansible-playbook -i localhost, -c local awx_install.yml

    PLAY [all] **************************************************************************************************************************

    TASK [Gathering Facts] **************************************************************************************************************
    ok: [localhost]

    TASK [copy prereq check script] *****************************************************************************************************
    changed: [localhost]

    TASK [execute prereq check script] **************************************************************************************************
    changed: [localhost]

    TASK [remove prereq check script] ***************************************************************************************************
    changed: [localhost]

    TASK [check if X11.base.lib is installed] *******************************************************************************************
    changed: [localhost]

    TASK [check if rsyslog.base is installed] *******************************************************************************************
    changed: [localhost]

    TASK [check if krb5.client.rte is installed] ****************************************************************************************
    changed: [localhost]

    TASK [update all packages] **********************************************************************************************************
    ok: [localhost]

    TASK [install required packages] ****************************************************************************************************
    changed: [localhost]

    TASK [make a temp install directory] ************************************************************************************************
    changed: [localhost]

    TASK [copy our required packages] ***************************************************************************************************
    changed: [localhost] => (item=linux_compat-0.1.2-1.aix7.2.ppc.rpm)
    changed: [localhost] => (item=redis-5.0.9-1aix.aix7.2.ppc.rpm)
    changed: [localhost] => (item=supervisor-4.2.0-2aix.aix7.2.noarch.rpm)
    changed: [localhost] => (item=xmlsec1-1.2.28-1.aix7.2.ppc.rpm)
    changed: [localhost] => (item=xmlsec1-openssl-1.2.28-1.aix7.2.ppc.rpm)

    TASK [install our packages] *********************************************************************************************************
    changed: [localhost]

    TASK [get shells] *******************************************************************************************************************
    changed: [localhost]

    TASK [set shells] *******************************************************************************************************************
    changed: [localhost]

    TASK [copy awx rpm] *****************************************************************************************************************
    changed: [localhost]

    TASK [install awx.rpm] **************************************************************************************************************
    changed: [localhost]

    TASK [remove temporary directory] ***************************************************************************************************
    changed: [localhost]

    TASK [add user nginx in group awx] **************************************************************************************************
    changed: [localhost]

    TASK [initialize postgresql] ********************************************************************************************************
    [WARNING]: Consider using 'become', 'become_method', and 'become_user' rather than running su
    changed: [localhost]

    TASK [create postgresql init script] ************************************************************************************************
    changed: [localhost]

    TASK [create redis init script] *****************************************************************************************************
    changed: [localhost]

    TASK [create supervisord init script] ***********************************************************************************************
    changed: [localhost]

    TASK [start postgresql] *************************************************************************************************************
    changed: [localhost]

    TASK [check awx user in postgres] ***************************************************************************************************
    changed: [localhost]

    TASK [create awx user in postgres] **************************************************************************************************
    changed: [localhost]

    TASK [check awx database in postgres] ***********************************************************************************************
    fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["su", "-", "postgres", "-c", "/opt/freeware/bin/psql -lqt | cut -d\\| -f1 | grep -qw awx"], "delta": "0:00:00.076952", "end": "2021-04-28 13:57:56.039685", "msg": "non-zero return code", "rc": 1, "start": "2021-04-28 13:57:55.962733", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
    ...ignoring

    TASK [create awx database] **********************************************************************************************************
    changed: [localhost]

    TASK [create database structures] ***************************************************************************************************
    changed: [localhost]

    TASK [create superuser] *************************************************************************************************************
    changed: [localhost]

    TASK [create some preload data] *****************************************************************************************************
    changed: [localhost]

    TASK [provision instance] ***********************************************************************************************************
    changed: [localhost]

    TASK [register queue] ***************************************************************************************************************
    changed: [localhost]

    TASK [get hostname] *****************************************************************************************************************
    changed: [localhost]

    TASK [ensure we have right hostname in /etc/tower/settings.py] **********************************************************************
    changed: [localhost]

    TASK [set the notification host url] ************************************************************************************************
    changed: [localhost]

    TASK [ensure correct permissions on /var/run/tower] *********************************************************************************
    changed: [localhost]

    TASK [start redis] ******************************************************************************************************************
    changed: [localhost]

    TASK [start nginx] ******************************************************************************************************************
    changed: [localhost]

    TASK [start supervisord] ************************************************************************************************************
    changed: [localhost]

    TASK [debug] ************************************************************************************************************************
    ok: [localhost] => {
        "msg": [
            "1. Login to your AIX server",
            "2. Create a password for the AWX superuser using the following command:",
            "su - awx -c awx-manage changepassword admin",
            "3. Start the browser and go to:",
            "https://utaxanst/#/login"
        ]
    }

    PLAY RECAP **************************************************************************************************************************
    localhost                  : ok=40   changed=37   unreachable=0    failed=0    skipped=0    rescued=0    ignored=1

    root@utaxanst:/tmp/awsinstall/awx-install # su - awx -c awx-manage changepassword admin
    Changing password for user 'admin'
    Password:
    Password (again):
    Password changed successfully for user 'admin'


    There is RED section which probably mean that there is problem with posgresql db?

    TASK [check awx database in postgres] ***********************************************************************************************
    fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["su", "-", "postgres", "-c", "/opt/freeware/bin/psql -lqt | cut -d\\| -f1 | grep -qw awx"], "delta": "0:00:00.076952", "end": "2021-04-28 13:57:56.039685", "msg": "non-zero return code", "rc": 1, "start": "2021-04-28 13:57:55.962733", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
    ...ignoring

    Any hint?

    B.


    On Wed, Apr 28, 2021 at 1:45 PM maesho maesho <maeshopo@gmail.com> wrote:
    Hi,

    I have checked python script which is gathering facts on the beginning, he is detecting svr4pkg because its last pkg manager he found, yum is first..

    PKG_MGRS = [{'path': '/usr/bin/yum', 'name': 'yum'},
                {'path': '/usr/bin/dnf', 'name': 'dnf'},
                {'path': '/usr/bin/apt-get', 'name': 'apt'},
                {'path': '/usr/bin/zypper', 'name': 'zypper'},
                {'path': '/usr/sbin/urpmi', 'name': 'urpmi'},
                {'path': '/usr/bin/pacman', 'name': 'pacman'},
                {'path': '/bin/opkg', 'name': 'opkg'},
                {'path': '/usr/pkg/bin/pkgin', 'name': 'pkgin'},
                {'path': '/opt/local/bin/pkgin', 'name': 'pkgin'},
                {'path': '/opt/tools/bin/pkgin', 'name': 'pkgin'},
                {'path': '/opt/local/bin/port', 'name': 'macports'},
                {'path': '/usr/local/bin/brew', 'name': 'homebrew'},
                {'path': '/sbin/apk', 'name': 'apk'},
                {'path': '/usr/sbin/pkg', 'name': 'pkgng'},
                {'path': '/usr/sbin/swlist', 'name': 'swdepot'},
                {'path': '/usr/bin/emerge', 'name': 'portage'},
                {'path': '/usr/sbin/pkgadd', 'name': 'svr4pkg'}, <<<< /usr/sbin/pkgadd  exist so he choose svr4pkg instead of yum
                {'path': '/usr/bin/pkg', 'name': 'pkg5'},
                {'path': '/usr/bin/xbps-install', 'name': 'xbps'},
                {'path': '/usr/local/sbin/pkg', 'name': 'pkgng'},
                {'path': '/usr/bin/swupd', 'name': 'swupd'},
                {'path': '/usr/sbin/sorcery', 'name': 'sorcery'},
                {'path': '/usr/bin/rpm-ostree', 'name': 'atomic_container'},
                {'path': '/usr/bin/installp', 'name': 'installp'},
                ]
    ....


    Workaroud is:
    - remove line " {'path': '/usr/sbin/pkgadd', 'name': 'svr4pkg'}" from  pkg_mgr.py (tested, its installing now...)
    - or probably editing playbook and add: "use_backend: yum" should also help but I dont want to do it for every playbook in the future

    Can you maybe provide me better solution which dont involve editing config files? (I am not familiar with ansible so far....)

    Regards,
    B.


    On Wed, Apr 28, 2021 at 1:15 PM maesho maesho <maeshopo@gmail.com> wrote:
    Hello,

    I have decided that I perform a clean install with latest IBM Toolbox packages etc....

    So, I got first problem in installation where I dont know why instead of yum ansible expect svr4pkg on AIX?

    TASK [update all packages] *****************************************************
    fatal: [localhost]: FAILED! => {"ansible_facts": {"pkg_mgr": "svr4pkg"}, "changed": false, "msg": "value of state must be one of: present, absent, got: latest"}

    Can you reproduce this bug? Ay hint how to fix it for the future?

    Regards,

    B.









  • 4.  RE: Installing Ansible AWX on AIX 7.2

    Posted Thu April 29, 2021 05:05 AM
    Hello,

    so web is working using https, problem was on my side (old firefox), so only problem is that yum detection issue, how to fix it without editing python script or playbooks....

    Regards,
    B.

    image.png

    On Wed, Apr 28, 2021 at 2:12 PM maesho maesho <maeshopo@gmail.com> wrote:
    Hello,

    aws installation playbook finished OK but I see only nginx test page when tryning http://<server_ip>

    root@utaxanst:/tmp/awsinstall/awx-install # ansible-playbook -i localhost, -c local awx_install.yml

    PLAY [all] **************************************************************************************************************************

    TASK [Gathering Facts] **************************************************************************************************************
    ok: [localhost]

    TASK [copy prereq check script] *****************************************************************************************************
    changed: [localhost]

    TASK [execute prereq check script] **************************************************************************************************
    changed: [localhost]

    TASK [remove prereq check script] ***************************************************************************************************
    changed: [localhost]

    TASK [check if X11.base.lib is installed] *******************************************************************************************
    changed: [localhost]

    TASK [check if rsyslog.base is installed] *******************************************************************************************
    changed: [localhost]

    TASK [check if krb5.client.rte is installed] ****************************************************************************************
    changed: [localhost]

    TASK [update all packages] **********************************************************************************************************
    ok: [localhost]

    TASK [install required packages] ****************************************************************************************************
    changed: [localhost]

    TASK [make a temp install directory] ************************************************************************************************
    changed: [localhost]

    TASK [copy our required packages] ***************************************************************************************************
    changed: [localhost] => (item=linux_compat-0.1.2-1.aix7.2.ppc.rpm)
    changed: [localhost] => (item=redis-5.0.9-1aix.aix7.2.ppc.rpm)
    changed: [localhost] => (item=supervisor-4.2.0-2aix.aix7.2.noarch.rpm)
    changed: [localhost] => (item=xmlsec1-1.2.28-1.aix7.2.ppc.rpm)
    changed: [localhost] => (item=xmlsec1-openssl-1.2.28-1.aix7.2.ppc.rpm)

    TASK [install our packages] *********************************************************************************************************
    changed: [localhost]

    TASK [get shells] *******************************************************************************************************************
    changed: [localhost]

    TASK [set shells] *******************************************************************************************************************
    changed: [localhost]

    TASK [copy awx rpm] *****************************************************************************************************************
    changed: [localhost]

    TASK [install awx.rpm] **************************************************************************************************************
    changed: [localhost]

    TASK [remove temporary directory] ***************************************************************************************************
    changed: [localhost]

    TASK [add user nginx in group awx] **************************************************************************************************
    changed: [localhost]

    TASK [initialize postgresql] ********************************************************************************************************
    [WARNING]: Consider using 'become', 'become_method', and 'become_user' rather than running su
    changed: [localhost]

    TASK [create postgresql init script] ************************************************************************************************
    changed: [localhost]

    TASK [create redis init script] *****************************************************************************************************
    changed: [localhost]

    TASK [create supervisord init script] ***********************************************************************************************
    changed: [localhost]

    TASK [start postgresql] *************************************************************************************************************
    changed: [localhost]

    TASK [check awx user in postgres] ***************************************************************************************************
    changed: [localhost]

    TASK [create awx user in postgres] **************************************************************************************************
    changed: [localhost]

    TASK [check awx database in postgres] ***********************************************************************************************
    fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["su", "-", "postgres", "-c", "/opt/freeware/bin/psql -lqt | cut -d\\| -f1 | grep -qw awx"], "delta": "0:00:00.076952", "end": "2021-04-28 13:57:56.039685", "msg": "non-zero return code", "rc": 1, "start": "2021-04-28 13:57:55.962733", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
    ...ignoring

    TASK [create awx database] **********************************************************************************************************
    changed: [localhost]

    TASK [create database structures] ***************************************************************************************************
    changed: [localhost]

    TASK [create superuser] *************************************************************************************************************
    changed: [localhost]

    TASK [create some preload data] *****************************************************************************************************
    changed: [localhost]

    TASK [provision instance] ***********************************************************************************************************
    changed: [localhost]

    TASK [register queue] ***************************************************************************************************************
    changed: [localhost]

    TASK [get hostname] *****************************************************************************************************************
    changed: [localhost]

    TASK [ensure we have right hostname in /etc/tower/settings.py] **********************************************************************
    changed: [localhost]

    TASK [set the notification host url] ************************************************************************************************
    changed: [localhost]

    TASK [ensure correct permissions on /var/run/tower] *********************************************************************************
    changed: [localhost]

    TASK [start redis] ******************************************************************************************************************
    changed: [localhost]

    TASK [start nginx] ******************************************************************************************************************
    changed: [localhost]

    TASK [start supervisord] ************************************************************************************************************
    changed: [localhost]

    TASK [debug] ************************************************************************************************************************
    ok: [localhost] => {
        "msg": [
            "1. Login to your AIX server",
            "2. Create a password for the AWX superuser using the following command:",
            "su - awx -c awx-manage changepassword admin",
            "3. Start the browser and go to:",
            "https://utaxanst/#/login"
        ]
    }

    PLAY RECAP **************************************************************************************************************************
    localhost                  : ok=40   changed=37   unreachable=0    failed=0    skipped=0    rescued=0    ignored=1

    root@utaxanst:/tmp/awsinstall/awx-install # su - awx -c awx-manage changepassword admin
    Changing password for user 'admin'
    Password:
    Password (again):
    Password changed successfully for user 'admin'


    There is RED section which probably mean that there is problem with posgresql db?

    TASK [check awx database in postgres] ***********************************************************************************************
    fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["su", "-", "postgres", "-c", "/opt/freeware/bin/psql -lqt | cut -d\\| -f1 | grep -qw awx"], "delta": "0:00:00.076952", "end": "2021-04-28 13:57:56.039685", "msg": "non-zero return code", "rc": 1, "start": "2021-04-28 13:57:55.962733", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []}
    ...ignoring

    Any hint?

    B.


    On Wed, Apr 28, 2021 at 1:45 PM maesho maesho <maeshopo@gmail.com> wrote:
    Hi,

    I have checked python script which is gathering facts on the beginning, he is detecting svr4pkg because its last pkg manager he found, yum is first..

    PKG_MGRS = [{'path': '/usr/bin/yum', 'name': 'yum'},
                {'path': '/usr/bin/dnf', 'name': 'dnf'},
                {'path': '/usr/bin/apt-get', 'name': 'apt'},
                {'path': '/usr/bin/zypper', 'name': 'zypper'},
                {'path': '/usr/sbin/urpmi', 'name': 'urpmi'},
                {'path': '/usr/bin/pacman', 'name': 'pacman'},
                {'path': '/bin/opkg', 'name': 'opkg'},
                {'path': '/usr/pkg/bin/pkgin', 'name': 'pkgin'},
                {'path': '/opt/local/bin/pkgin', 'name': 'pkgin'},
                {'path': '/opt/tools/bin/pkgin', 'name': 'pkgin'},
                {'path': '/opt/local/bin/port', 'name': 'macports'},
                {'path': '/usr/local/bin/brew', 'name': 'homebrew'},
                {'path': '/sbin/apk', 'name': 'apk'},
                {'path': '/usr/sbin/pkg', 'name': 'pkgng'},
                {'path': '/usr/sbin/swlist', 'name': 'swdepot'},
                {'path': '/usr/bin/emerge', 'name': 'portage'},
                {'path': '/usr/sbin/pkgadd', 'name': 'svr4pkg'}, <<<< /usr/sbin/pkgadd  exist so he choose svr4pkg instead of yum
                {'path': '/usr/bin/pkg', 'name': 'pkg5'},
                {'path': '/usr/bin/xbps-install', 'name': 'xbps'},
                {'path': '/usr/local/sbin/pkg', 'name': 'pkgng'},
                {'path': '/usr/bin/swupd', 'name': 'swupd'},
                {'path': '/usr/sbin/sorcery', 'name': 'sorcery'},
                {'path': '/usr/bin/rpm-ostree', 'name': 'atomic_container'},
                {'path': '/usr/bin/installp', 'name': 'installp'},
                ]
    ....


    Workaroud is:
    - remove line " {'path': '/usr/sbin/pkgadd', 'name': 'svr4pkg'}" from  pkg_mgr.py (tested, its installing now...)
    - or probably editing playbook and add: "use_backend: yum" should also help but I dont want to do it for every playbook in the future

    Can you maybe provide me better solution which dont involve editing config files? (I am not familiar with ansible so far....)

    Regards,
    B.


    On Wed, Apr 28, 2021 at 1:15 PM maesho maesho <maeshopo@gmail.com> wrote:
    Hello,

    I have decided that I perform a clean install with latest IBM Toolbox packages etc....

    So, I got first problem in installation where I dont know why instead of yum ansible expect svr4pkg on AIX?

    TASK [update all packages] *****************************************************
    fatal: [localhost]: FAILED! => {"ansible_facts": {"pkg_mgr": "svr4pkg"}, "changed": false, "msg": "value of state must be one of: present, absent, got: latest"}

    Can you reproduce this bug? Ay hint how to fix it for the future?

    Regards,

    B.