From eecc4046e879ab4867a973c21b92de3f629eb49d Mon Sep 17 00:00:00 2001 From: Sloane Hertel <19572925+s-hertel@users.noreply.github.com> Date: Fri, 7 Oct 2022 15:27:17 -0400 Subject: [PATCH] Fix empty str defaults in config/base.yml (#77733) * fix empty str default for config/base.yml config options by rendering '' instead of ``''`` Co-authored-by: Brian Coca --- docs/templates/config.rst.j2 | 4 ++++ lib/ansible/config/base.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/templates/config.rst.j2 b/docs/templates/config.rst.j2 index 34b2b849518..5af4f154013 100644 --- a/docs/templates/config.rst.j2 +++ b/docs/templates/config.rst.j2 @@ -127,7 +127,11 @@ you can use the command line utility mentioned above (`ansible-config`) to brows :Type: {{config['type']}} {% endif %} {% if 'default' in config %} +{% if config['default'] == '' %} +:Default: {{config['default']}} +{% else %} :Default: ``{{config['default']}}`` +{% endif %} {% endif %} {% if config.get('choices', False) %} :Choices: diff --git a/lib/ansible/config/base.yml b/lib/ansible/config/base.yml index 80619558b73..c7fef870068 100644 --- a/lib/ansible/config/base.yml +++ b/lib/ansible/config/base.yml @@ -491,7 +491,7 @@ DEFAULT_BECOME_EXE: - {key: become_exe, section: privilege_escalation} DEFAULT_BECOME_FLAGS: name: Set 'become' executable options - default: ~ + default: '' description: Flags to pass to the privilege escalation executable. env: [{name: ANSIBLE_BECOME_FLAGS}] ini: