diff --git a/changelogs/fragments/2510-jenkins_plugin_use_post_method.yml b/changelogs/fragments/2510-jenkins_plugin_use_post_method.yml new file mode 100644 index 0000000000..b310e27061 --- /dev/null +++ b/changelogs/fragments/2510-jenkins_plugin_use_post_method.yml @@ -0,0 +1,2 @@ +bugfixes: + - jenkins_plugin - use POST method for sending request to jenkins API when ``state`` option is one of ``enabled``, ``disabled``, ``pinned``, ``unpinned``, or ``absent`` (https://github.com/ansible-collections/community.general/issues/2510). diff --git a/plugins/modules/web_infrastructure/jenkins_plugin.py b/plugins/modules/web_infrastructure/jenkins_plugin.py index c9946023ac..be335fcfd3 100644 --- a/plugins/modules/web_infrastructure/jenkins_plugin.py +++ b/plugins/modules/web_infrastructure/jenkins_plugin.py @@ -696,7 +696,8 @@ class JenkinsPlugin(object): self._get_url_data( url, msg_status="Plugin not found. %s" % url, - msg_exception="%s has failed." % msg) + msg_exception="%s has failed." % msg, + method="POST") def main():