mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-04 08:11:30 -07:00
Jenkins_plugin: Handle 'latest' version when installing plugin for first time (#49723)
* Handle 'latest' version when installing module for first time Otherwise, a fresh install of a plugin with 'version: latest' gets installed without its dependencies, rendering the plugin effectively useless. * Add changelog
This commit is contained in:
parent
3e303bea4c
commit
01a1ce16ce
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- "jenkins_plugin - ``version: latest`` should install new plugins with their dependencies"
|
|
@ -387,7 +387,7 @@ class JenkinsPlugin(object):
|
||||||
self.params['jenkins_home'],
|
self.params['jenkins_home'],
|
||||||
self.params['name']))
|
self.params['name']))
|
||||||
|
|
||||||
if not self.is_installed and self.params['version'] is None:
|
if not self.is_installed and self.params['version'] in [None, 'latest']:
|
||||||
if not self.module.check_mode:
|
if not self.module.check_mode:
|
||||||
# Install the plugin (with dependencies)
|
# Install the plugin (with dependencies)
|
||||||
install_script = (
|
install_script = (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue