diff options
author | Matt Martz <matt@sivel.net> | 2018-10-23 11:08:48 -0500 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2018-10-23 12:29:12 -0700 |
commit | 376b199c0540e39189bdf6b31b9a60eadffa3989 (patch) | |
tree | 8f7e20339ce192971884acfa8cff42596f2af021 /lib/ansible/playbook | |
parent | 18f07e828e67c98c089ed282bc15f0644cd56606 (diff) | |
download | ansible-376b199c0540e39189bdf6b31b9a60eadffa3989.tar.gz |
[stable-2.7] 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
(cherry picked from commit d5e4f37)
Co-authored-by: Matt Martz <matt@sivel.net>
Diffstat (limited to 'lib/ansible/playbook')
-rw-r--r-- | lib/ansible/playbook/play.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index 370a77f4df..2469122ca1 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -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) |