parent
370f788731
commit
6e1a59174a
2 changed files with 5 additions and 2 deletions
3
changelogs/fragments/67735-warning-cleanup.yml
Normal file
3
changelogs/fragments/67735-warning-cleanup.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
bugfixes:
|
||||
- Update the warning message for ``CONDITIONAL_BARE_VARS`` to list the original conditional
|
||||
not the value of the original conditional (https://github.com/ansible/ansible/issues/67735)
|
|
@ -133,8 +133,8 @@ class Conditional:
|
|||
disable_lookups = hasattr(conditional, '__UNSAFE__')
|
||||
conditional = templar.template(conditional, disable_lookups=disable_lookups)
|
||||
if bare_vars_warning and not isinstance(conditional, bool):
|
||||
display.deprecated('evaluating %s as a bare variable, this behaviour will go away and you might need to add |bool'
|
||||
' to the expression in the future. Also see CONDITIONAL_BARE_VARS configuration toggle' % conditional, "2.12")
|
||||
display.deprecated('evaluating %r as a bare variable, this behaviour will go away and you might need to add |bool'
|
||||
' to the expression in the future. Also see CONDITIONAL_BARE_VARS configuration toggle' % original, "2.12")
|
||||
if not isinstance(conditional, text_type) or conditional == "":
|
||||
return conditional
|
||||
|
||||
|
|
Loading…
Reference in a new issue