Problem:
I have been testing running some ansible roles from a foreman host. I have one role that uses the command module to set up a globus connect server endpoint. When I run the role directly with ansible it returns correctly but when I use foreman to run the role on the host I get an error output even though the command completes correctly.
925:
TASK [globus_node_setup : Initiate globus entpoint node] ***********************
926:
fatal: [sched-dtn03.dromedary.peaks]: FAILED! => {"changed": true, "cmd": ["globus-connect-server", "node", "setup", "--client-id", " ", "--secret", ""], "delta": "0:00:03.830480", "end": "2023-04-24 13:55:01.469978", "failed_when_result": "The conditional check '(\"invalid_client\" not in result.sterr) and (result.stderr != '')\n' failed. The error was: error while evaluating conditional ((\"invalid_client\" not in result.sterr) and (result.stderr != '')\n): 'dict object' has no attribute 'sterr'", "msg": "non-zero return code", "rc": 1, "start": "2023-04-24 13:54:57.639498", "stderr": "invalid_client", "stderr_lines": ["invalid_client"], "stdout": "IP address not specified, using ", "stdout_lines": ["IP address not specified, using "]}
Expected outcome:
TASK [globus_node_setup : Initiate globus entpoint node] *********************************************************************************************
changed: [sched-dtn03.chpc.utah.edu]
Foreman and Proxy versions:
Foreman 3.7.0-develop
Foreman and Proxy plugin versions:
Ansible: 3.5.4
Remote-Execution: 9.1.0
Distribution and version:
Rocky Linux 8.7