Project

General

Profile

Actions

Bug #30691

closed

Ansible runs role dependency on the begin of every dependency role.

Added by Ondřej Ezr over 3 years ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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

Actions #1

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
Actions #2

Updated by Marek Hulán about 1 year ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF