Skip to content

Commit

Permalink
Fix launchd check-mode to report changed correctly (#8476)
Browse files Browse the repository at this point in the history
* Fix launchd check-mode to report changed correctly

* Update changelog fragment.

---------

Co-authored-by: Strahinja Kustudic <[email protected]>
Co-authored-by: Felix Fontein <[email protected]>
  • Loading branch information
3 people authored Jun 17, 2024
1 parent 69b72e4 commit 2612cee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/8476-launchd-check-mode-changed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- launched - correctly report changed status in check mode (https://github.com/ansible-collections/community.general/pull/8406).
3 changes: 2 additions & 1 deletion plugins/modules/launchd.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@ def main():
result['status']['current_pid'] != result['status']['previous_pid']):
result['changed'] = True
if module.check_mode:
result['changed'] = True
if result['status']['current_state'] != action:
result['changed'] = True
module.exit_json(**result)


Expand Down

0 comments on commit 2612cee

Please sign in to comment.