diff --git a/README.md b/README.md index a3dedaf..1a7b93c 100644 --- a/README.md +++ b/README.md @@ -17,18 +17,8 @@ This example is taken from [`molecule/default/converge.yml`](https://github.com/ become: yes gather_facts: yes - # We want to test some non-default version of java, to ensure we can install a specific version. - vars: - _desired_java_version: - default: 8 - Amazon: 17 - Debian: 11 - Debian-bookworm: 17 - desired_java_version: "{{ _desired_java_version[ansible_distribution ~ '-' ~ ansible_distribution_release] | default(_desired_java_version[ansible_distribution] | default(_desired_java_version['default'])) }}" - roles: - role: robertdebock.java - java_version: "{{ desired_java_version }}" ``` The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/robertdebock/ansible-role-java/blob/master/molecule/default/prepare.yml): diff --git a/tasks/assert.yml b/tasks/assert.yml index eb04c88..76db029 100644 --- a/tasks/assert.yml +++ b/tasks/assert.yml @@ -19,7 +19,7 @@ - name: assert | Test if java_version is set correctly ansible.builtin.assert: that: - - java_version | int is integer + - java_version is number - java_version | int in [ 6, 7, 8, 9, 10, 11, 12, 13, 17, 19 ] quiet: yes when: