Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ansible/ansible.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSloane Hertel <19572925+s-hertel@users.noreply.github.com>2022-10-07 22:27:17 +0300
committerGitHub <noreply@github.com>2022-10-07 22:27:17 +0300
commiteecc4046e879ab4867a973c21b92de3f629eb49d (patch)
treeeaf05e5be2cf1a052033753391f4484732918fe8
parente208fe59329a45966d23f28bd92c0ee5592ac71b (diff)
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 <bcoca@users.noreply.github.com>
-rw-r--r--docs/templates/config.rst.j24
-rw-r--r--lib/ansible/config/base.yml2
2 files changed, 5 insertions, 1 deletions
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: