Bug #30691
closedAnsible runs role dependency on the begin of every dependency role.
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1842291
Description of problem:
Ansible would only play dependent roles once.
It plays dependent roles before every role if run by Foreman, which causes it to play them multiple times when running roles on hosts.
How reproducible:
A complete reproducer is shared publicly in connected BZ
Actual results:
When a host has roles and those roles have the same dependency, the ansible is running the dependency roles every time before the role, as the following example.
Host 1 with ansible roles 'ansible_role_1','ansible_role_2','ansible_role_3'
Running ansible role ansible_role_dependency
Running ansible role ansible_role_1
Running ansible role ansible_role_dependency
Running ansible role ansible_role_2
Running ansible role ansible_role_dependency
Running ansible role ansible_role_3
This makes ansible terribly slow and repetitive.
Expected results:
The dependency role would be executed just once if it is a dependency for other roles.
Running ansible role ansible_role_dependency
Running ansible role ansible_role_1
Running ansible role ansible_role_2
Running ansible role ansible_role_3
Updated by Ondřej Ezr almost 3 years ago
- Subject changed from Ansible runs role dependency on the begin of every dependency role. to Ansible runs role dependency on the begin of every dependency role.
- Triaged changed from No to Yes