Skip to content

Commit

Permalink
java_version is an integer.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Jul 8, 2022
1 parent 23bff24 commit e343ec0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ java_type: jre
# By default, a distibution default is used, mapped in `vars/main.yml`.
# By setting java_version, you overwrite this default to your selected
# version.
java_version: "{{ java_default_version }}"
java_version: {{ java_default_version }}

# Set the format of the installation source, valid values are "targz" and
# "rpm". This is only valid with "java_vendor == oracle"
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ java_type: jre
# By default, a distibution default is used, mapped in `vars/main.yml`.
# By setting java_version, you overwrite this default to your selected
# version.
java_version: "{{ java_default_version }}"
java_version: {{ java_default_version }}

# Set the format of the installation source, valid values are "targz" and
# "rpm". This is only valid with "java_vendor == oracle"
Expand Down
3 changes: 2 additions & 1 deletion tasks/assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
- name: test if java_version is set correctly
ansible.builtin.assert:
that:
- java_version in [ "6", "7", "8", "9", "10", "11", "12", "13" ]
- java_version is integer
- java_version in [ 6, 7, 8, 9, 10, 11, 12, 13 ]
quiet: yes
when:
- java_version is defined
Expand Down

0 comments on commit e343ec0

Please sign in to comment.