Remove Jinja2 template delimiters from when statements, which makes Ansible throw warnings:
TASK [Install python] **********************************************************
[WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: {{ ubuntu_release.stdout |
version_compare('16.04', '>=') }}
skipping: [ansible-java]
TASK [Gather facts] ************************************************************
ok: [ansible-java]
TASK [ansible-java : Add OpenJDK PPA] ******************************************
[WARNING]: when statements should not include jinja2 templating delimiters
such as {{ }} or {% %}. Found: {{ ansible_distribution_version |
version_compare('14.04', '=') and java_major_version | version_compare('8',
'>=') }}
Stop manually installing OpenJDK dependencies, since they are installed when the openjdk-*-jdk package is installed.
Update the roles section format of playbook.yml.
Testing
Run molecule test --platform=all, ensure all tests pass.
Overview
when
statements, which makes Ansible throw warnings:openjdk-*-jdk
package is installed.roles
section format ofplaybook.yml
.Testing
molecule test --platform=all
, ensure all tests pass.