|
|
@ -181,6 +181,8 @@ def merge_hash(x, y, recursive=True, list_merge='replace'):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def load_extra_vars(loader):
|
|
|
|
def load_extra_vars(loader):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not getattr(load_extra_vars, 'extra_vars', None):
|
|
|
|
extra_vars = {}
|
|
|
|
extra_vars = {}
|
|
|
|
for extra_vars_opt in context.CLIARGS.get('extra_vars', tuple()):
|
|
|
|
for extra_vars_opt in context.CLIARGS.get('extra_vars', tuple()):
|
|
|
|
data = None
|
|
|
|
data = None
|
|
|
@ -205,11 +207,14 @@ def load_extra_vars(loader):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
raise AnsibleOptionsError("Invalid extra vars data supplied. '%s' could not be made into a dictionary" % extra_vars_opt)
|
|
|
|
raise AnsibleOptionsError("Invalid extra vars data supplied. '%s' could not be made into a dictionary" % extra_vars_opt)
|
|
|
|
|
|
|
|
|
|
|
|
return extra_vars
|
|
|
|
setattr(load_extra_vars, 'extra_vars', extra_vars)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return load_extra_vars.extra_vars
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def load_options_vars(version):
|
|
|
|
def load_options_vars(version):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not getattr(load_options_vars, 'options_vars', None):
|
|
|
|
if version is None:
|
|
|
|
if version is None:
|
|
|
|
version = 'Unknown'
|
|
|
|
version = 'Unknown'
|
|
|
|
options_vars = {'ansible_version': version}
|
|
|
|
options_vars = {'ansible_version': version}
|
|
|
@ -227,7 +232,9 @@ def load_options_vars(version):
|
|
|
|
if opt is not None:
|
|
|
|
if opt is not None:
|
|
|
|
options_vars['ansible_%s' % alias] = opt
|
|
|
|
options_vars['ansible_%s' % alias] = opt
|
|
|
|
|
|
|
|
|
|
|
|
return options_vars
|
|
|
|
setattr(load_options_vars, 'options_vars', options_vars)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return load_options_vars.options_vars
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _isidentifier_PY3(ident):
|
|
|
|
def _isidentifier_PY3(ident):
|
|
|
|