summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins
diff options
context:
space:
mode:
authorSloane Hertel <19572925+s-hertel@users.noreply.github.com>2021-06-22 11:24:02 -0400
committerGitHub <noreply@github.com>2021-06-22 17:24:02 +0200
commitca6123e0ee0707b4cdf74137b5778fd913da8357 (patch)
tree2109b7f29fcfd4e98ea2b484000ce3908c78efc6 /lib/ansible/plugins
parent3a8fc2d2be9062d4efb152be8c0c7fb6918fc587 (diff)
downloadansible-ca6123e0ee0707b4cdf74137b5778fd913da8357.tar.gz
Template suboptions in a role's arg spec (#75073)
Diffstat (limited to 'lib/ansible/plugins')
-rw-r--r--lib/ansible/plugins/action/validate_argument_spec.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/ansible/plugins/action/validate_argument_spec.py b/lib/ansible/plugins/action/validate_argument_spec.py
index 4162005202..9ad0a46df6 100644
--- a/lib/ansible/plugins/action/validate_argument_spec.py
+++ b/lib/ansible/plugins/action/validate_argument_spec.py
@@ -31,12 +31,8 @@ class ActionModule(ActionBase):
for argument_name, argument_attrs in iteritems(argument_spec):
if argument_name in task_vars:
- if isinstance(task_vars[argument_name], string_types):
- value = self._templar.do_template(task_vars[argument_name])
- if value:
- args[argument_name] = value
- else:
- args[argument_name] = task_vars[argument_name]
+ args[argument_name] = task_vars[argument_name]
+ args = self._templar.template(args)
return args
def run(self, tmp=None, task_vars=None):