Description of problem: When using ansible-runner instead of ansible-playbook in Satellite 6.6.2 playbooks that are not assigned are executed Version-Release number of selected component (if applicable): Satellite 6.6.2 How reproducible: Whenever ansible-runner is used for ansible playbooks. Steps to Reproduce: 1. Set Satellite to use ansible-runner to execute playbooks instead of ansible-playbook 2. Install 3 clients, client-a to client-c 3. Create 3 hostgroups and add each client to a different hostgroup 4. Add different ansible playbooks to each hostgroup 5. select all 3 clients in "All Hosts" 6. Run "Play Ansible Roles" Actual results: The correct playbooks are listed if you then check it in "Preview Templates" but it seems that all playbooks that are assigned to the first client in the list is executed on all clients. This is not the expected behavior and may damage customer systems if Satellite runs not assigned playbooks. Expected results: Only playbooks that are assigned should be executed on clients. Satellite needs to calculate which clients have the same playbooks assigned and only group these in ansible-runner tasks. Additional info:
Created redmine issue https://projects.theforeman.org/issues/29261 from this bug
FailedQA. @Satellite 6.7.0 Snap15 tfm-rubygem-foreman_ansible-4.0.3.1-1.el7sat.noarch using following reproducer: 1) Register 2 Hosts and set them up for REX 2) Import 2 ansible roles 3) Assign 1st role to 1st host and 2nd role to 2nd host 4) schedule Ansible play roles for the hosts >>> for every host all roles were played
Not all roles were played. Only the output is a bit misleading. There are listed tasks for all roles but played tasks have "ok" The played task: ------- TASK [linuxhq.setup : Ensure that the setup package is installed] ************** ok: [host1.example.com] ------- The task that wasn't played (no "ok"): ------- TASK [geerlingguy.ntp : Include OS-specific variables.] ************************ ------- >>> Only the roles assigned to the specific host were played for the host
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:1454