1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

pacemaker_cluster: deprecate cleanup state (#10741)

* Add deprecation for pacemaker_cluster cleanup state

* Add changelog fragment

* Apply suggestions from code review

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Dexter 2025-08-27 16:04:01 -04:00 committed by GitHub
parent 3b09e9d9ed
commit c881be0999
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View file

@ -0,0 +1,2 @@
deprecated_features:
- pacemaker_cluster - the state ``cleanup`` will be removed from community.general 14.0.0 (https://github.com/ansible-collections/community.general/pull/10741).

View file

@ -99,6 +99,13 @@ class PacemakerCluster(StateModuleHelper):
self.vars.set('previous_value', self._get()['out'])
self.vars.set('value', self.vars.previous_value, change=True, diff=True)
if self.module.params['state'] == "cleanup":
self.module.deprecate(
'The value `cleanup` for "state" is being deprecated, use pacemaker_resource module instead.',
version='14.0.0',
collection_name='community.general'
)
if not self.module.params['state']:
self.module.deprecate(
'Parameter "state" values not set is being deprecated. Make sure to provide a value for "state"',