mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 02:41:25 -07:00
git_config: fix state=absent if value is present (#8452)
* Fix state=absent if value is present. * Update changelog fragment.
This commit is contained in:
parent
0129346eda
commit
2a3819a696
3 changed files with 27 additions and 1 deletions
|
@ -252,7 +252,7 @@ def main():
|
|||
module.exit_json(changed=False, msg='', config_value=old_values[0] if old_values else '')
|
||||
elif unset and not out:
|
||||
module.exit_json(changed=False, msg='no setting to unset')
|
||||
elif new_value in old_values and (len(old_values) == 1 or add_mode == "add"):
|
||||
elif new_value in old_values and (len(old_values) == 1 or add_mode == "add") and not unset:
|
||||
module.exit_json(changed=False, msg="")
|
||||
|
||||
# Until this point, the git config was just read and in case no change is needed, the module has already exited.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue