summaryrefslogtreecommitdiff
path: root/lib/ansible/playbook/included_file.py
diff options
context:
space:
mode:
authorSloane Hertel <19572925+s-hertel@users.noreply.github.com>2023-04-17 10:22:03 -0400
committerGitHub <noreply@github.com>2023-04-17 09:22:03 -0500
commit62a353c085e10ed8d8713357421a06e00de551f4 (patch)
tree7df1492b080ac215a82259a5b5d97ef6e7f6ebfb /lib/ansible/playbook/included_file.py
parent495d48d51eea1ca5eccaecbb4bc96341d759dc2b (diff)
downloadansible-62a353c085e10ed8d8713357421a06e00de551f4.tar.gz
fix using templated values for include/import role FA (#80320) (#80378)
* fix using templated values for include/import role options 'public', 'allow_duplicates', and 'rolespec_validate' * pass templated values without changing the instance * Fix templating by setting always_post_validate to True and calling IncludeRole.post_validate() instead ci_complete * add changelog (cherry picked from commit 666188892ed0833e87803a3e80c58923e4cd6bca)
Diffstat (limited to 'lib/ansible/playbook/included_file.py')
-rw-r--r--lib/ansible/playbook/included_file.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ansible/playbook/included_file.py b/lib/ansible/playbook/included_file.py
index 409eaec795..b833077c95 100644
--- a/lib/ansible/playbook/included_file.py
+++ b/lib/ansible/playbook/included_file.py
@@ -187,6 +187,7 @@ class IncludedFile:
role_name = templar.template(role_name)
new_task = original_task.copy()
+ new_task.post_validate(templar=templar)
new_task._role_name = role_name
for from_arg in new_task.FROM_ARGS:
if from_arg in include_args: