Description of problem: Roles assigned only to host_a show up in host_b job invocation details. Version-Release number of selected component (if applicable): Satellite 6.12 Let me explain it on a real example: - Have 2 hosts - 'jsenkyri-rhel8' and 'jsenkyri-rhel7' - Assign 'RedHatInsights.insights-client' role to 'jsenkyri-rhel8' - Do *not* assign any roles to 'jsenkyri-rhel7' - Select both hosts and hit 'Run all Ansible roles' - Check job details for 'jsenkyri-rhel7'. Tasks related to 'RedHatInsights.insights-client' role are visible even though the role is *not* assigned to this host. See attached screenshot. Actual results: Role(s) assigned *only* to 'jsenkyri-rhel8' show-up in 'jsenkyri-rhel7' job invocation details. Expected results: Job invocation details for 'jsenkyri-rhel7' should only show roles/tasks that are assigned to this particular host.
Created attachment 1934563 [details] job invocation details
One more behavior that might be related: - Choose multiple hosts (e.g. host_a, host_b, host_c, host_d) and make host_a unreachable (e.g. shutdown). - Run All Ansible roles for these 4 hosts. Actual result: - All 4 hosts are shown as failed (see attached screenshot) - Check details for host_d and you can see that all tasks finished ok but the exit code is 4: ~~~ TASK [Apply roles] ************************************************************* 165: 166: TASK [RedHatInsights.insights-client : Install 'insights-client'] ************** 167: ok: [jsenkyri-rhel8-sat612-d.sysmgmt.lan] 168: 169: TASK [RedHatInsights.insights-client : Set Insights Configuration Values] ****** 170: ok: [jsenkyri-rhel8-sat612-d.sysmgmt.lan] 171: 172: TASK [RedHatInsights.insights-client : Register Insights Client] *************** 173: ok: [jsenkyri-rhel8-sat612-d.sysmgmt.lan] 174: 175: TASK [RedHatInsights.insights-client : Change permissions of Insights Config directory so that Insights System ID can be read] *** 176: ok: [jsenkyri-rhel8-sat612-d.sysmgmt.lan] 177: 178: TASK [RedHatInsights.insights-client : Change permissions of machine_id file so that Insights System ID can be read] *** 179: ok: [jsenkyri-rhel8-sat612-d.sysmgmt.lan] 180: 181: TASK [RedHatInsights.insights-client : Create directory for ansible custom facts] *** 182: ok: [jsenkyri-rhel8-sat612-d.sysmgmt.lan] 183: 184: TASK [RedHatInsights.insights-client : Install custom insights fact] *********** 185: ok: [jsenkyri-rhel8-sat612-d.sysmgmt.lan] 186: 187: TASK [RedHatInsights.insights-client : Enable Insights timer] ****************** 188: ok: [jsenkyri-rhel8-sat612-d.sysmgmt.lan] 189: PLAY RECAP ********************************************************************* 190: jsenkyri-rhel8-sat612-d.sysmgmt.lan : ok=10 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 191: Exit status: 4 ~~~ Expected results: - Only host_a is shown as failed. host_b, host_c and host_d should be marked as successful.
Created attachment 1948364 [details] invocation_all_failed
Bug 2156522 is similar but I don't think it's an exact match.
Created redmine issue https://projects.theforeman.org/issues/36353 from this bug