From c0cd4827daeea1cbe28a2f0034642749047716f6 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Thu, 23 Nov 2023 06:53:29 +0100 Subject: [PATCH] [PR #7558/fce91ebb backport][stable-7] ini_file: documentation for 'section' to stop mentioning that null can be passed (#7583) ini_file: documentation for 'section' to stop mentioning that null can be passed (#7558) Update ini_file's documentation for 'section' to stop mentioning that null can be passed. (cherry picked from commit fce91ebbd4409349e5575cc8fcdcfec807bb9eed) Co-authored-by: Felix Fontein --- plugins/modules/ini_file.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/modules/ini_file.py b/plugins/modules/ini_file.py index 8e67a832ec..a8c3caa4b3 100644 --- a/plugins/modules/ini_file.py +++ b/plugins/modules/ini_file.py @@ -43,8 +43,8 @@ options: description: - Section name in INI file. This is added if O(state=present) automatically when a single value is being set. - - If left empty, being omitted, or being set to V(null), the O(option) will be placed before the first O(section). - - Using V(null) is also required if the config format does not support sections. + - If being omitted, the O(option) will be placed before the first O(section). + - Omitting O(section) is also required if the config format does not support sections. type: str option: description: @@ -171,6 +171,13 @@ EXAMPLES = r''' - pepsi mode: '0600' state: present + +- name: Add "beverage=lemon juice" outside a section in specified file + community.general.ini_file: + path: /etc/conf + option: beverage + value: lemon juice + state: present ''' import io