4a89749dd5
* 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
(cherry picked from commit eca7c3c8c7
)
18 lines
436 B
YAML
18 lines
436 B
YAML
- name: test that import_role adds one (just one) execution of the role
|
|
hosts: localhost
|
|
gather_facts: false
|
|
tags: ['importrole']
|
|
roles:
|
|
- name: a
|
|
tasks:
|
|
- name: import role ignores dupe rule
|
|
import_role: name=a
|
|
|
|
- name: test that include_role adds one (just one) execution of the role
|
|
hosts: localhost
|
|
gather_facts: false
|
|
tags: ['includerole']
|
|
roles:
|
|
- name: a
|
|
tasks:
|
|
- include_role: name=a
|