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
pull/48299/head
Gavin Williams 6 years ago committed by John R Barker
parent 3e303bea4c
commit 01a1ce16ce

@ -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['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:
# Install the plugin (with dependencies)
install_script = (

Loading…
Cancel
Save