robertdebock / ansible-role-tomcat

Install and configure tomcat on your system.
https://robertdebock.nl/
Apache License 2.0
46 stars 57 forks source link

no test named 'boolean' #24

Closed javid90khan closed 3 years ago

javid90khan commented 3 years ago

Appreciation

I really like your implementation of this. It is very clean and scalable.

Describe the bug

I get an error "No test 'boolean'" on TASK [robertdebock.tomcat : test if tomcat_validate_certs is set correctly] I know this may not be happening with you but I run several ansible roles without any issues. If I comment out the 'boolean' validation it works.

Playbook

---
  vars_files:
    - defaults/main.yml
  become: yes

  roles:
    - role: robertdebock.tomcat
      vars:
        tomcat_directory: /home/tomcat
        tomcat_instances:
          - name: "instance_myapp1"
            version: 8
            java_opts:
              - name: JAVA_HOME
                value: "/opt/red/java"
            shutdown_port: 8019
            non_ssl_connector_port: 8084
            ssl_connector_port: 8447
            ajp_port: 8013
            wars:
            - url: "{{ download_url }}"

Output

FAILED! => {"msg": "The conditional check 'tomcat_validate_certs is boolean' failed. The error was: template error while templating string: no test named 'boolean'. String: {% if tomcat_validate_certs is boolean %} True {% else %} False {% endif %}"}

Environment

Please consider sponsoring me.

javid90khan commented 3 years ago

Fixed by upgrading my Jinja2 with: pip3 install jinja2==2.11.2