community.healthchecksio
community.healthchecksio copied to clipboard
Check mode for checks module
SUMMARY
It would be great if the checks module would support ansible check mode.
Especially returning the check's uuid, if it already exists.
ISSUE TYPE
- Feature Idea
COMPONENT NAME
checks
ADDITIONAL INFORMATION
ansible-playbook playbook.yml -i hosts -b --diff --tags healthchecks --check
Currently, the module unconditionally returns an empty dictionary in ansible check mode:
https://github.com/ansible-collections/community.healthchecksio/blob/6d8dad1cb0b9a21ce67faf982ea2734335674c13/plugins/module_utils/healthchecksio.py#L285-L287
With minimal support, the UUID of the check could be returned, if it already exists.
Ideally, it would also set the changed attribute based on whether it would have to change the check.