-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ini_file - add feature 'section_has_values' #7505
ini_file - add feature 'section_has_values' #7505
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't had time to read the change in detail, but here are some first comments from a quick glance:
needs_info |
@jakob-bebop this PR contains the following merge commits: Please rebase your branch to remove these commits. |
This comment was marked as outdated.
This comment was marked as outdated.
|
2dccddb
to
fdfbaf6
Compare
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some more nits. Please note that there are some other suggestions that are still open.
If nobody objects, I'll merge this on the upcoming weekend (after applying the remaining suggestions if they haven't been applied yet). |
be4d5b7
into
ansible-collections:main
Backport to stable-8: 💚 backport PR created✅ Backport PR branch: Backported as #8250 🤖 @patchback |
* insert new code * add changelog * add argument_spec * sanity check * docstring version_added * version-added-must-be-major-or-minor * Update plugins/modules/ini_file.py Co-authored-by: Felix Fontein <felix@fontein.de> * check for default value `None` * typo in example * add integration test and rename option * add license * update "version added" in docstring * insert new code * remove whitespace * update examples * support exclusive, allow_no_value, multiple values in section_has_values * prefer Todd's variable naming in loops * resolve number clash in file names * pass sanity test validate-modules * Documentation updates --------- Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Todd Lewis <todd_lewis@unc.edu> (cherry picked from commit be4d5b7)
@jakob-bebop @utoddl thanks for your contributions! |
…n_has_values' (#8250) ini_file - add feature 'section_has_values' (#7505) * insert new code * add changelog * add argument_spec * sanity check * docstring version_added * version-added-must-be-major-or-minor * Update plugins/modules/ini_file.py Co-authored-by: Felix Fontein <felix@fontein.de> * check for default value `None` * typo in example * add integration test and rename option * add license * update "version added" in docstring * insert new code * remove whitespace * update examples * support exclusive, allow_no_value, multiple values in section_has_values * prefer Todd's variable naming in loops * resolve number clash in file names * pass sanity test validate-modules * Documentation updates --------- Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Todd Lewis <todd_lewis@unc.edu> (cherry picked from commit be4d5b7) Co-authored-by: Jakob Lund <jakob@avforlaget.dk>
* insert new code * add changelog * add argument_spec * sanity check * docstring version_added * version-added-must-be-major-or-minor * Update plugins/modules/ini_file.py Co-authored-by: Felix Fontein <felix@fontein.de> * check for default value `None` * typo in example * add integration test and rename option * add license * update "version added" in docstring * insert new code * remove whitespace * update examples * support exclusive, allow_no_value, multiple values in section_has_values * prefer Todd's variable naming in loops * resolve number clash in file names * pass sanity test validate-modules * Documentation updates --------- Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Todd Lewis <todd_lewis@unc.edu>
SUMMARY
ini_file: Add an optional parameter
section_has
. If the target ini file contains more than onesection
, usesection_has
to specify which one should be updated.Use case: In wireguard config there can be multiple [Peer] sections. See example in source code doc string
ISSUE TYPE
COMPONENT NAME
ini_file