From d81f56e10bcf7874b91abf18a90f2c3ea428a92b Mon Sep 17 00:00:00 2001
From: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Date: Tue, 31 Dec 2024 11:38:32 +1300
Subject: [PATCH] sensu_*: deprecation (#9483)

* sensu_*: deprecation

* add changelog frag
---
 .../fragments/9483-sensu-deprecation.yml      |  6 ++++++
 meta/runtime.yml                              | 20 +++++++++++++++++++
 plugins/modules/sensu_check.py                |  4 ++++
 plugins/modules/sensu_client.py               |  4 ++++
 plugins/modules/sensu_handler.py              |  4 ++++
 plugins/modules/sensu_silence.py              |  4 ++++
 plugins/modules/sensu_subscription.py         |  4 ++++
 7 files changed, 46 insertions(+)
 create mode 100644 changelogs/fragments/9483-sensu-deprecation.yml

diff --git a/changelogs/fragments/9483-sensu-deprecation.yml b/changelogs/fragments/9483-sensu-deprecation.yml
new file mode 100644
index 0000000000..daa219202d
--- /dev/null
+++ b/changelogs/fragments/9483-sensu-deprecation.yml
@@ -0,0 +1,6 @@
+deprecated_features:
+  - sensu_check - module is deprecated and will be removed in community.general 13.0.0, use collection ``sensu.sensu_go`` instead (https://github.com/ansible-collections/community.general/pull/9483).
+  - sensu_client - module is deprecated and will be removed in community.general 13.0.0, use collection ``sensu.sensu_go`` instead (https://github.com/ansible-collections/community.general/pull/9483).
+  - sensu_handler - module is deprecated and will be removed in community.general 13.0.0, use collection ``sensu.sensu_go`` instead (https://github.com/ansible-collections/community.general/pull/9483).
+  - sensu_silence - module is deprecated and will be removed in community.general 13.0.0, use collection ``sensu.sensu_go`` instead (https://github.com/ansible-collections/community.general/pull/9483).
+  - sensu_subscription - module is deprecated and will be removed in community.general 13.0.0, use collection ``sensu.sensu_go`` instead (https://github.com/ansible-collections/community.general/pull/9483).
diff --git a/meta/runtime.yml b/meta/runtime.yml
index b52bc8b911..3e7c797fd9 100644
--- a/meta/runtime.yml
+++ b/meta/runtime.yml
@@ -230,6 +230,26 @@ plugin_routing:
         removal_version: 10.0.0
         warning_text: RHN is EOL, please contact the community.general maintainers
           if still using this; see the module documentation for more details.
+    sensu_check:
+      deprecation:
+        removal_version: 13.0.0
+        warning_text: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
+    sensu_client:
+      deprecation:
+        removal_version: 13.0.0
+        warning_text: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
+    sensu_handler:
+      deprecation:
+        removal_version: 13.0.0
+        warning_text: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
+    sensu_silence:
+      deprecation:
+        removal_version: 13.0.0
+        warning_text: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
+    sensu_subscription:
+      deprecation:
+        removal_version: 13.0.0
+        warning_text: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
     stackdriver:
       tombstone:
         removal_version: 9.0.0
diff --git a/plugins/modules/sensu_check.py b/plugins/modules/sensu_check.py
index 1eb73e98ee..42ffcf3737 100644
--- a/plugins/modules/sensu_check.py
+++ b/plugins/modules/sensu_check.py
@@ -17,6 +17,10 @@ description:
   - Most options do not have a default and will not be added to the check definition unless specified.
   - All defaults except O(path), O(state), O(backup) and O(metric) are not managed by this module,
     they are simply specified for your convenience.
+deprecated:
+  removed_in: 13.0.0
+  why: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
+  alternative: Use Sensu Go and its accompanying collection C(sensu.sensu_go).
 extends_documentation_fragment:
   - community.general.attributes
 attributes:
diff --git a/plugins/modules/sensu_client.py b/plugins/modules/sensu_client.py
index bf5d2a7e26..50a5c0ae74 100644
--- a/plugins/modules/sensu_client.py
+++ b/plugins/modules/sensu_client.py
@@ -15,6 +15,10 @@ short_description: Manages Sensu client configuration
 description:
   - Manages Sensu client configuration.
   - 'For more information, refer to the Sensu documentation: U(https://sensuapp.org/docs/latest/reference/clients.html)'
+deprecated:
+  removed_in: 13.0.0
+  why: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
+  alternative: Use Sensu Go and its accompanying collection C(sensu.sensu_go).
 extends_documentation_fragment:
   - community.general.attributes
 attributes:
diff --git a/plugins/modules/sensu_handler.py b/plugins/modules/sensu_handler.py
index fa952a7b41..995399cd39 100644
--- a/plugins/modules/sensu_handler.py
+++ b/plugins/modules/sensu_handler.py
@@ -15,6 +15,10 @@ short_description: Manages Sensu handler configuration
 description:
   - Manages Sensu handler configuration.
   - 'For more information, refer to the Sensu documentation: U(https://sensuapp.org/docs/latest/reference/handlers.html)'
+deprecated:
+  removed_in: 13.0.0
+  why: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
+  alternative: Use Sensu Go and its accompanying collection C(sensu.sensu_go).
 extends_documentation_fragment:
   - community.general.attributes
 attributes:
diff --git a/plugins/modules/sensu_silence.py b/plugins/modules/sensu_silence.py
index d3ec4b6934..1dfc8e1802 100644
--- a/plugins/modules/sensu_silence.py
+++ b/plugins/modules/sensu_silence.py
@@ -15,6 +15,10 @@ author: Steven Bambling (@smbambling)
 short_description: Manage Sensu silence entries
 description:
   - Create and clear (delete) a silence entries using the Sensu API for subscriptions and checks.
+deprecated:
+  removed_in: 13.0.0
+  why: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
+  alternative: Use Sensu Go and its accompanying collection C(sensu.sensu_go).
 extends_documentation_fragment:
   - community.general.attributes
 attributes:
diff --git a/plugins/modules/sensu_subscription.py b/plugins/modules/sensu_subscription.py
index 154f5cfa53..cddde2630b 100644
--- a/plugins/modules/sensu_subscription.py
+++ b/plugins/modules/sensu_subscription.py
@@ -14,6 +14,10 @@ module: sensu_subscription
 short_description: Manage Sensu subscriptions
 description:
   - Manage which I(sensu channels) a machine should subscribe to.
+deprecated:
+  removed_in: 13.0.0
+  why: Sensu Core and Sensu Enterprise products have been End of Life since 2019/20.
+  alternative: Use Sensu Go and its accompanying collection C(sensu.sensu_go).
 extends_documentation_fragment:
   - community.general.attributes
 attributes: