1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/integration/targets/roles/no_dupes.yml
Brian Coca eca7c3c8c7 Prevent duplicate role insertion into roles: (#50552)
* Corner case in which import_role would add another instance of a role with the same signature into roles: when it already existed there.

  roles:
	- name: a
  tasks:
       - import_role: name=a

  would execute role 'a' 3 times instead of the intended 2 (x2 in roles: phase +1 in tasks:)

* added tests
2019-01-16 13:39:03 -05:00

19 lines
500 B
YAML

- name: play should only show 1 invocation of a, as dependencies in this play are deduped
hosts: testhost
gather_facts: false
tags: [ 'inroles' ]
roles:
- role: a
- role: b
- role: c
- name: play should only show 1 invocation of a, as dependencies in this play are deduped even outside of roles
hosts: testhost
gather_facts: false
tags: [ 'acrossroles' ]
roles:
- role: a
- role: b
tasks:
- name: execute role c which depends on a
import_role: name=c