diff --git a/lib/ansible/cli/config.py b/lib/ansible/cli/config.py index a3c465671c9..328b3c1110f 100644 --- a/lib/ansible/cli/config.py +++ b/lib/ansible/cli/config.py @@ -274,7 +274,7 @@ class ConfigCLI(CLI): if subkey == 'env': data.append('%s%s=%s' % (prefix, entry, default)) elif subkey == 'vars': - data.append(prefix + to_text(yaml.dump({entry: default}, Dumper=AnsibleDumper), errors='surrogate_or_strict')) + data.append(prefix + to_text(yaml.dump({entry: default}, Dumper=AnsibleDumper, default_flow_style=False), errors='surrogate_or_strict')) data.append('') return data diff --git a/test/integration/targets/config/aliases b/test/integration/targets/config/aliases index d6ed0088c9d..a6dafcf8cd8 100644 --- a/test/integration/targets/config/aliases +++ b/test/integration/targets/config/aliases @@ -1,4 +1 @@ shippable/posix/group1 -skip/python2 -skip/python3.6 -skip/python3.7 diff --git a/test/integration/targets/config/runme.sh b/test/integration/targets/config/runme.sh index 57c3a82f0a6..76df44c4a92 100755 --- a/test/integration/targets/config/runme.sh +++ b/test/integration/targets/config/runme.sh @@ -31,15 +31,9 @@ cleanup() { trap 'cleanup' EXIT -diff_failure() { - if [[ $INIT = 0 ]]; then - echo "FAILURE...diff mismatch!" - exit 1 - fi -} # check a-c init per format for format in "vars" "ini" "env" do ANSIBLE_LOOKUP_PLUGINS=./ ansible-config init types -t lookup -f "${format}" > "files/types.new.${format}" - diff -u "files/types.${format}" "files/types.new.${format}"|| diff_failure + diff -u "files/types.${format}" "files/types.new.${format}" done