Ensure we don't overwrite roles from include/import_role when loading the play (#47512)

* Ensure we don't overwrite roles from include/import_role when loading the play. Fixes #47454

* Add changelog fragment
This commit is contained in:
Matt Martz 2018-10-23 11:08:48 -05:00 committed by GitHub
commit d5e4f37ca0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 1 deletions

View file

@ -195,7 +195,12 @@ class Play(Base, Taggable, Become):
roles = []
for ri in role_includes:
roles.append(Role.load(ri, play=self))
return roles
return self._extend_value(
self.roles,
roles,
prepend=True
)
def _load_vars_prompt(self, attr, ds):
new_ds = preprocess_vars(ds)