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
This commit is contained in:
Brian Coca
2019-01-16 13:39:03 -05:00
committed by Sam Doran
parent e89fb35843
commit eca7c3c8c7
11 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
bugfixes:
- prevent import_role from inserting dupe into `roles:` execution when duplicate signature role already exists in the section.