[PR #11254/cc24e573 backport][stable-12] monit: deprecate support for monit <= 5.18 (#11609)

monit: deprecate support for monit <= 5.18 (#11254)

* monit: deprecate support for monit <= 5.18

* add additional runs for checking version

* add changelog frag

* bump deprecation for 14.0.0

(cherry picked from commit cc24e57307)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot]
2026-03-16 20:16:41 +01:00
committed by GitHub
parent 7784fbdf17
commit 000b92a425
4 changed files with 16 additions and 2 deletions

View File

@@ -39,6 +39,8 @@ options:
author:
- Darryl Stoflet (@dstoflet)
- Simon Kelly (@snopoke)
requirements:
- Monit. Support for versions 5.18 and older is deprecated and will be removed in community.general 14.0.0.
"""
EXAMPLES = r"""
@@ -125,6 +127,13 @@ class Monit:
self._raw_version = None
self._status_change_retry_count = 6
if self.monit_version() <= (5, 18):
module.deprecate(
"Support for monit 5.18 and older is deprecated and will be removed in community.general 14.0.0.",
version="14.0.0",
collection_name="community.general",
)
def monit_version(self):
if self._monit_version is None:
self._raw_version, version = self._get_monit_version()