mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
Replace passing `warnings to exit_json with AnsibleModule.warn` for the few modules (#1033)
SUMMARY Using exit_json or fail_json for warnings is deprecated in ansible-core>=2.19.0 and will be removed in ansible-core>=2.23.0 Tested with ansible-core 2.19.3 as the latest released version at the time of the start of this PR and with 2.16.0 as the lowest version supported by kubernetes.core 6.x Resolves: #1031 ISSUE TYPE Bugfix Pull Request COMPONENT NAME k8s_drain k8s_rollback k8s_scale ADDITIONAL INFORMATION The initial version of this PR covers only the module k8s_drain, with the following commits extended to k8s_rollback k8s_scale Reviewed-by: Bianca Henderson <beeankha@gmail.com> Reviewed-by: Mike Graves <mgraves@redhat.com> Reviewed-by: Alina Buzachis
This commit is contained in:
committed by
GitHub
parent
13791ec7bf
commit
3e32c12c40
2
changelogs/fragments/1033-warnings-deprecations.yaml
Normal file
2
changelogs/fragments/1033-warnings-deprecations.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- Replace passing ``warnings`` to ``exit_json`` with ``AnsibleModule.warn`` in the ``k8s_drain``, ``k8s_rollback.py`` and ``k8s_scale.py`` modules as it deprecated in ``ansible-core>=2.19.0`` and will be removed in ``ansible-core>=2.23.0`` (https://github.com/ansible-collections/kubernetes.core/pull/1033).
|
||||
Reference in New Issue
Block a user