diff --git a/changelogs/fragments/null_means_none.yml b/changelogs/fragments/null_means_none.yml new file mode 100644 index 00000000000..af3982e08af --- /dev/null +++ b/changelogs/fragments/null_means_none.yml @@ -0,0 +1,2 @@ +bugfixes: + - null_representation config entry changed to 'raw' as it must allow 'none/null' and empty string. diff --git a/lib/ansible/config/base.yml b/lib/ansible/config/base.yml index a2c43745241..a824ec2e734 100644 --- a/lib/ansible/config/base.yml +++ b/lib/ansible/config/base.yml @@ -940,7 +940,7 @@ DEFAULT_NULL_REPRESENTATION: env: [{name: ANSIBLE_NULL_REPRESENTATION}] ini: - {key: null_representation, section: defaults} - type: none + type: raw DEFAULT_POLL_INTERVAL: name: Async poll interval default: 15 diff --git a/test/integration/targets/template/badnull1.cfg b/test/integration/targets/template/badnull1.cfg new file mode 100644 index 00000000000..e1d0688ccb2 --- /dev/null +++ b/test/integration/targets/template/badnull1.cfg @@ -0,0 +1,2 @@ +[defaults] +null_representation = null diff --git a/test/integration/targets/template/badnull2.cfg b/test/integration/targets/template/badnull2.cfg new file mode 100644 index 00000000000..058ca48cefd --- /dev/null +++ b/test/integration/targets/template/badnull2.cfg @@ -0,0 +1,2 @@ +[defaults] +null_representation = '' diff --git a/test/integration/targets/template/badnull3.cfg b/test/integration/targets/template/badnull3.cfg new file mode 100644 index 00000000000..3c743fba53b --- /dev/null +++ b/test/integration/targets/template/badnull3.cfg @@ -0,0 +1,2 @@ +[defaults] +null_representation = none diff --git a/test/integration/targets/template/runme.sh b/test/integration/targets/template/runme.sh index 7a07c4fb021..30163af7db9 100755 --- a/test/integration/targets/template/runme.sh +++ b/test/integration/targets/template/runme.sh @@ -44,3 +44,11 @@ ansible-playbook in_template_overrides.yml -v "$@" ansible-playbook lazy_eval.yml -i ../../inventory -v "$@" ansible-playbook undefined_in_import.yml -i ../../inventory -v "$@" + +# ensure diff null configs work #76493 +for badcfg in "badnull1" "badnull2" "badnull3" +do + [ -f "./${badcfg}.cfg" ] + ANSIBLE_CONFIG="./${badcfg}.cfg" ansible-config dump --only-changed +done +