mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
allow Jinja2 in ansible -a when ALLOW_JINJA_IN_EXTRA_VARS is 'always'
This commit is contained in:
parent
246e63bdb6
commit
99d2f3ea34
@ -2266,7 +2266,10 @@ class RunAdHocCommand(BaseTask):
|
||||
args.extend(['-e', '@%s' % (extra_vars_path)])
|
||||
|
||||
args.extend(['-m', ad_hoc_command.module_name])
|
||||
args.extend(['-a', sanitize_jinja(ad_hoc_command.module_args)])
|
||||
module_args = ad_hoc_command.module_args
|
||||
if settings.ALLOW_JINJA_IN_EXTRA_VARS != 'always':
|
||||
module_args = sanitize_jinja(module_args)
|
||||
args.extend(['-a', module_args])
|
||||
|
||||
if ad_hoc_command.limit:
|
||||
args.append(ad_hoc_command.limit)
|
||||
|
Loading…
Reference in New Issue
Block a user