From e9076221212df9232e34a406053e5a40d77abd5c Mon Sep 17 00:00:00 2001 From: Nehal J Wani Date: Wed, 21 Dec 2016 12:02:23 +0530 Subject: [PATCH] jenkins_plugin: doc: Specify version as string (#18858) If the plugin version expected is, say '1.20', then specifying it as... version: 1.20 ... will make the YAML parser interpret it as a float, and the value obtained by the module will be 1.2 instead of 1.20, which will cause downloading of wrong version of the module. This patch updates the docs so that users don't face this issue. --- lib/ansible/modules/web_infrastructure/jenkins_plugin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/web_infrastructure/jenkins_plugin.py b/lib/ansible/modules/web_infrastructure/jenkins_plugin.py index 1d66e19c608..13941986265 100644 --- a/lib/ansible/modules/web_infrastructure/jenkins_plugin.py +++ b/lib/ansible/modules/web_infrastructure/jenkins_plugin.py @@ -120,6 +120,8 @@ options: manually. - It might take longer to verify that the correct version is installed. This is especially true if a specific version number is specified. + - Quote the version to prevent the value to be interpreted as float. For + example if C(1.20) would be unquoted, it would become C(1.2). with_dependencies: required: false choices: ['yes', 'no'] @@ -159,7 +161,7 @@ EXAMPLES = ''' - name: Install specific version of the plugin jenkins_plugin: name: token-macro - version: 1.15 + version: "1.15" - name: Pin the plugin jenkins_plugin: @@ -212,7 +214,7 @@ EXAMPLES = ''' token-macro: enabled: yes build-pipeline-plugin: - version: 1.4.9 + version: "1.4.9" pinned: no enabled: yes tasks: