|
|
|
@ -30,6 +30,7 @@ except ImportError:
|
|
|
|
|
from ansible.utils.display import Display
|
|
|
|
|
display = Display()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_reserved_names(include_private=True):
|
|
|
|
|
''' this function returns the list of reserved names associated with play objects'''
|
|
|
|
|
|
|
|
|
@ -66,6 +67,7 @@ def get_reserved_names(include_private=True):
|
|
|
|
|
|
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def warn_if_reserved(myvars):
|
|
|
|
|
''' this function warns if any variable passed conflicts with internally reserved names '''
|
|
|
|
|
reserved = get_reserved_names()
|
|
|
|
@ -74,4 +76,3 @@ def warn_if_reserved(myvars):
|
|
|
|
|
continue # we add this one internally
|
|
|
|
|
if varname in reserved:
|
|
|
|
|
display.warning('Found variable using reserved name: %s' % varname)
|
|
|
|
|
|
|
|
|
|