diff --git a/lib/ansible/utils/__init__.py b/lib/ansible/utils/__init__.py index 1bd08495b3..68b384c6be 100644 --- a/lib/ansible/utils/__init__.py +++ b/lib/ansible/utils/__init__.py @@ -692,6 +692,7 @@ def safe_eval(str): def is_set(var): return not var.startswith("$") and not '{{' in var + def is_unset(var): return var.startswith("$") or '{{' in var diff --git a/lib/ansible/utils/template.py b/lib/ansible/utils/template.py index e38fd0dfa0..f1c9981820 100644 --- a/lib/ansible/utils/template.py +++ b/lib/ansible/utils/template.py @@ -32,7 +32,7 @@ import pwd class Flags: - LEGACY_TEMPLATE_WARNING = False + LEGACY_TEMPLATE_WARNING = False # TODO: refactor this file