TASK [redhat.eap.eap_utils : Retrieve product download using JBoss Network API] **************************************************************************************************************************************************************
task path: /root/.ansible/collections/ansible_collections/redhat/eap/roles/eap_utils/tasks/download_from_rhn.yml:10
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c 'echo ~root && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1695917116.6203964-25295-81108532614409 `" && echo ansible-tmp-1695917116.6203964-25295-81108532614409="` echo /root/.ansible/tmp/ansible-tmp-1695917116.6203964-25295-81108532614409 `" ) && sleep 0'
Using module file /root/.ansible/collections/ansible_collections/redhat/runtimes_common/plugins/modules/product_search.py
<localhost> PUT /root/.ansible/tmp/ansible-local-25015bne4uffu/tmp_mnisjku TO /root/.ansible/tmp/ansible-tmp-1695917116.6203964-25295-81108532614409/AnsiballZ_product_search.py
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1695917116.6203964-25295-81108532614409/ /root/.ansible/tmp/ansible-tmp-1695917116.6203964-25295-81108532614409/AnsiballZ_product_search.py && sleep 0'
<localhost> EXEC /bin/sh -c 'python2 /root/.ansible/tmp/ansible-tmp-1695917116.6203964-25295-81108532614409/AnsiballZ_product_search.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1695917116.6203964-25295-81108532614409/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1695917116.6203964-25295-81108532614409/AnsiballZ_product_search.py", line 100, in <module>
_ansiballz_main()
File "/usr/lib64/python2.7/runpy.py", line 113, in _get_module_details
code = loader.get_code(mod_name)
File "/tmp/ansible_redhat.runtimes_common.product_search_payload_2zVMdx/ansible_redhat.runtimes_common.product_search_payload.zip/ansible_collections/redhat/runtimes_common/plugins/modules/product_search.py", line 170
f"from '{REDHAT_PRODUCT_DOWNLOAD_CLIENT_ID_ENV_VAR}' environment variable."))
^
SyntaxError: invalid syntax
fatal: [localhost -> localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1695917116.6203964-25295-81108532614409/AnsiballZ_product_search.py\", line 100, in <module>\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1695917116.6203964-25295-81108532614409/AnsiballZ_product_search.py\", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1695917116.6203964-25295-81108532614409/AnsiballZ_product_search.py\", line 41, in invoke_module\n run_name='__main__', alter_sys=True)\n File \"/usr/lib64/python2.7/runpy.py\", line 170, in run_module\n mod_name, loader, code, fname = _get_module_details(mod_name)\n File \"/usr/lib64/python2.7/runpy.py\", line 113, in _get_module_details\n code = loader.get_code(mod_name)\n File \"/tmp/ansible_redhat.runtimes_common.product_search_payload_2zVMdx/ansible_redhat.runtimes_common.product_search_payload.zip/ansible_collections/redhat/runtimes_common/plugins/modules/product_search.py\", line 170\n f\"from '{REDHAT_PRODUCT_DOWNLOAD_CLIENT_ID_ENV_VAR}' environment variable.\"))\n ^\nSyntaxError: invalid syntax\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
SUMMARY
Support for Python 2 in the JBossNetworkAPI modules
ISSUE TYPE
ANSIBLE VERSION
COLLECTION VERSION
STEPS TO REPRODUCE
Leverage modules from the JBossNetworkAPI using Python 2
EXPECTED RESULTS
Desired capabilities to search or download products functions as desired
ACTUAL RESULTS