Skip to content
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

[PR #3033/25267b80 backport][stable-3] ini_file: add multiple options with same name to ini file #3207

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Aug 15, 2021

This is a backport of PR #3033 as merged into main (25267b8).

SUMMARY

This PR:

  • add the ability to 'add' or 'remove' single option=value entries
  • add the ability to define multiple options with the same name but different values

Fixes #273
#1204 can be closed as well, I guess

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ini_file

ADDITIONAL INFORMATION

I also restructured the tests to separate them into several test files. I put the initial changes to the tests into a separate commit (8522eab), so you can verify they are still green and run through. This also guarantees that my changes do not break old behaviour.

* ini_file - prepare for fixing #273
 - restructure tests
 - fix error message call: fail_json() takes 1 positional argument but 2 were given

* ini_file - multiple values for one option (#273)
  - add module option 'exclusive' (boolean) for the abbility to add
    single option=value entries without overwriting existing options
    with the same name but different values
  - add abbility to define multiple options with the same name but
    different values

* ini_file - add more tests for ini_file

* ini_file - fix sanity tests

* apply suggested changes:

- rename 03-regressions.yml to 03-encoding.yml
- fix typos
- fix documentation

* apply suggested changes:

- test errors also for result is failed

* apply suggested changes:

- make state=absent also work with module option exclusive
- add more tests for state=absent and module option exclusive

* fix sanity test:

- 02-values.yml:251:9: hyphens: too many spaces after hyphen

* apply proposed changes

* apply proposed changes from review
- adjust version_added to 3.6.0
- small syntax change in changelog fragment

(cherry picked from commit 25267b8)
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added affects_2.10 community_review feature This issue/PR relates to a feature request files integration tests/integration module module needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging tests tests labels Aug 15, 2021
@felixfontein felixfontein merged commit 7caefbd into stable-3 Aug 15, 2021
@felixfontein felixfontein deleted the patchback/backports/stable-3/25267b80941f1b41c280ed2d6c1ec8162fb8a62b/pr-3033 branch August 15, 2021 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community_review feature This issue/PR relates to a feature request files integration tests/integration module module needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) stale_ci CI is older than 7 days, rerun before merging tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants