if we execute a playbook in parallel on multiple hosts, the Ansible playbook execution output will be split into separate job logs on Foreman for each host. The task headlines will be added in a round-robin fashion, along with the task responses for each task in each log. However, it is not readable anymore.
What versions of Foreman and foreman_ansible are you using?
Does it also happen when you run the Ansible roles on a single host?
I would add here a screenshot if possible
Navigate to “Hosts > Job Templates > Run,” select multiple hosts, and execute the task.or
Navigate to “Hosts > hostgroup_fullname / host_collection” to choose multiple hosts for execution.
The main problem is that, during each execution, the logs of each host split the task headline among the hosts just once. Additionally, the task status is logged separately for each host and execution.
We would like the task headline to be included in each individual log for every host execution.
In general it should just work and I’m not aware of any reports that this was broken in the release you’re on. I can at least confirm it indeed does work on 3.9.1.
I can somewhat reproduce the issue you’re describing if I switch the ansible execution strategy to free, either directly in the playbook I’m running or in /etc/ansible/ansible.cfg. Are you using a non-default ansible strategy?
[root@ ansible]# grep strategy /etc/ansible/ansible.cfg
(string) Set the default strategy used for plays.
;strategy=linear
;strategy_plugins={{ ANSIBLE_HOME ~ “/plugins/strategy:/usr/share/ansible/plugins/strategy” }}
The relevant playbooks are not set to strategy: free
We moved all variabelized infos to msg: or debug varibale into the task itself.
If the task headline is matching over all executed scripts as string the output is in sync.