Ansible: Always get Failed status for jobs and roles

Good day, Guys!

I’m using Foreman for couple of months.
In Foreman I use Ansible roles and Ansible playbooks as well:
=> Host => Schedule remote job =>Ansible playbook => Ansible - Run playbook

Each time I do this I receive “Failed” in the Job status.
Even if Ansible Role/Playbook works well.

Could you, please, help me to solve this issue?

Also, Guys, is there any way to run playbooks which are alredy present in yml files on same server (e.g. located in ~/Ansible/ folder)?

Expected outcome:
Fix problem with Ansible jobs status.

Foreman and Proxy versions:
Version 1.24.3 © 2009-2020 Paul Kelly and Ohad Levy
Instance 1ff98334-1042-49a4-ae5c-dc141c65ccf5

Foreman and Proxy plugin versions:
Ansible - Version3.0.1
DHCP - Version1.24.3
Dynflow - Version0.2.4
HTTPBoot - Version1.24.3
SSH - Version0.3.0
TFTP - Version1.24.3

Distribution and version:
CentOS Linux release 7.8.2003 (Core)

Other relevant data:

when you try running a playbook there’s a table with hosts at the bottom of the page. If you click on the host’s name, it will take you to a page showing the output of the job on that host. It is really hard to guess what went wrong just from what you said, but that page should give you more insight into it


According to job output - everything is ok.
Tasks run correctly. But job status is always the same…

Is there any way to capture detailed logs for such tasks?
To investigate and fix?

Ah, for some reason I thought that playbooks/roles run fine outside of foreman.

In the job details there’s “job task” button, on the page where it takes you click “sub tasks”, there pick a single task and look around, hopefully you’ll find something useful there.

On a side note, does it take like 10 minutes for the job to run even if it does almost nothing?

No, jobs works well. Quite fast.

I will run some simple task and will take a screenshot for it. Hope it will help.