|
|
@ -35,8 +35,12 @@ from ansible.utils.path import unfrackpath
|
|
|
|
display = Display()
|
|
|
|
display = Display()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def yaml_dump(data, default_flow_style=True):
|
|
|
|
def yaml_dump(data, default_flow_style=False, default_style=None):
|
|
|
|
return yaml.dump(data, Dumper=AnsibleDumper, default_flow_style=default_flow_style, default_style="''")
|
|
|
|
return yaml.dump(data, Dumper=AnsibleDumper, default_flow_style=default_flow_style, default_style=default_style)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def yaml_short(data):
|
|
|
|
|
|
|
|
return yaml_dump(data, default_flow_style=True, default_style="''")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_constants():
|
|
|
|
def get_constants():
|
|
|
@ -305,7 +309,7 @@ class ConfigCLI(CLI):
|
|
|
|
elif subkey == 'vars':
|
|
|
|
elif subkey == 'vars':
|
|
|
|
if entry.startswith('_ansible_'):
|
|
|
|
if entry.startswith('_ansible_'):
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
data.append(prefix + '%s: %s' % (entry, to_text(yaml_dump(default), errors='surrogate_or_strict')))
|
|
|
|
data.append(prefix + '%s: %s' % (entry, to_text(yaml_short(default), errors='surrogate_or_strict')))
|
|
|
|
data.append('')
|
|
|
|
data.append('')
|
|
|
|
|
|
|
|
|
|
|
|
return data
|
|
|
|
return data
|
|
|
|