Skip to content

Commit

Permalink
jenkins_plugin: doc: Specify version as string (ansible#18858)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nehaljwani authored and resmo committed Dec 21, 2016
1 parent 8c5d321 commit e907622
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ansible/modules/web_infrastructure/jenkins_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
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']
Expand Down Expand Up @@ -159,7 +161,7 @@
- name: Install specific version of the plugin
jenkins_plugin:
name: token-macro
version: 1.15
version: "1.15"
- name: Pin the plugin
jenkins_plugin:
Expand Down Expand Up @@ -212,7 +214,7 @@
token-macro:
enabled: yes
build-pipeline-plugin:
version: 1.4.9
version: "1.4.9"
pinned: no
enabled: yes
tasks:
Expand Down

0 comments on commit e907622

Please sign in to comment.