I am executing through an ansible tower the following code:
command:
chdir={{ __iim_install_location }}/eclipse/tools/
"su - {{ __was_user }} -c {{ __iim_install_location }}/eclipse/tools/imcl install {{ __product_id }} -acceptLicense -repositories {{ __tmp_dir }}/{{ item.file_name }} -installationDirectory {{ __was_install_location}} -log {{ __log_file }}"
register: cout
with_items: "{{ __was_this_files }}"
changed_when: cout.stdout is defined and ( cout.stdout.find( __version_check ) != -1)
I receive the following error. I validate and all the paths exist in the remote host.
{
"ansible_loop_var": "item",
"_ansible_no_log": false,
"changed": false,
"item": {
"check_sum": "866C82D13C24189E880C70AF7AE20143851330AD1C090E0DCF687B612BBC8513",
"file_name": "8.5.5.16-ws-was-ifph42899.zip"
},
"cmd": "'su - was -c /opt/IBM/was/InstallationManager/eclipse/tools/imcl install 8.5.5.16-WS-WAS-IFPH42899_8.5.5016.20211218_1245 -acceptLicense -repositories /mnt/software/IBM/WAS/8.5.5.16-ws-was-ifph42899.zip -installationDirectory /opt/IBM/was5/WebSphere/AppServer -log /opt/IBM/was/logs/was_nd_fix_install.20211223102239.log'",
"_ansible_item_label": {
"check_sum": "866C82D13C24189E880C70AF7AE20143851330AD1C090E0DCF687B612BBC8513",
"file_name": "8.5.5.16-ws-was-ifph42899.zip"
},
"rc": 2,
"invocation": {
"module_args": {
"creates": null,
"executable": null,
"chdir": "/opt/IBM/was/InstallationManager/eclipse/tools/",
"strip_empty_ends": true,
"_raw_params": "\"su - was -c /opt/IBM/was/InstallationManager/eclipse/tools/imcl install 8.5.5.16-WS-WAS-IFPH42899_8.5.5016.20211218_1245 -acceptLicense -repositories /mnt/software/IBM/WAS/8.5.5.16-ws-was-ifph42899.zip -installationDirectory /opt/IBM/was5/WebSphere/AppServer -log /opt/IBM/was/logs/was_nd_fix_install.20211223102239.log\"",
"removes": null,
"argv": null,
"warn": true,
"_uses_shell": false,
"stdin_add_newline": true,
"stdin": null
}
},
"msg": "[Errno 2] A file or directory in the path name does not exist.: b'su - was -c /opt/IBM/was/InstallationManager/eclipse/tools/imcl install 8.5.5.16-WS-WAS-IFPH42899_8.5.5016.20211218_1245 -acceptLicense -repositories /mnt/software/IBM/WAS/8.5.5.16-ws-was-ifph42899.zip -installationDirectory /opt/IBM/was5/WebSphere/AppServer -log /opt/IBM/was/logs/was_nd_fix_install.20211223102239.log': b'su - was -c /opt/IBM/was/InstallationManager/eclipse/tools/imcl install 8.5.5.16-WS-WAS-IFPH42899_8.5.5016.20211218_1245 -acceptLicense -repositories /mnt/software/IBM/WAS/8.5.5.16-ws-was-ifph42899.zip -installationDirectory /opt/IBM/was5/WebSphere/AppServer -log /opt/IBM/was/logs/was_nd_fix_install.20211223102239.log'"
}