Fix the distribution version check
This commit is contained in:
parent
2d4a27d216
commit
1a4923a6ac
|
@ -5,7 +5,7 @@
|
|||
# tomcat_fixed_version: 9
|
||||
tomcat_pkg_state: present
|
||||
tomcat_service_enabled: true
|
||||
tomcat_use_systemd_unit: "{% if ansible_distribution_major_version is version_compare('18.04', '>=') %}true{{ tomcat_version }}{% else %}false{% endif %}"
|
||||
tomcat_use_systemd_unit: "{% if ansible_distribution_version is version_compare('18.04', '>=') %}true{{ tomcat_version }}{% else %}false{% endif %}"
|
||||
tomcat_systemd_security_enhanced: false
|
||||
tomcat_systemd_security: "{% if tomcat_systemd_security_enhanced %}true{% else %}false{% endif %}"
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
ansible.builtin.set_fact:
|
||||
tomcat_version: 7
|
||||
when:
|
||||
- ansible_distribution_major_version is version_compare('16.04', '<')
|
||||
- ansible_distribution_version is version_compare('16.04', '<')
|
||||
- tomcat_fixed_version is not defined
|
||||
tags: ['tomcat', 'tomcat_ver', 'tomcat_conf', 'tomcat_javamelody']
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
ansible.builtin.set_fact:
|
||||
tomcat_version: 8
|
||||
when:
|
||||
- ansible_distribution_major_version is version_compare('18.04', '==')
|
||||
- ansible_distribution_version is version_compare('18.04', '==')
|
||||
- tomcat_fixed_version is not defined
|
||||
tags: ['tomcat', 'tomcat_ver', 'tomcat_conf', 'tomcat_javamelody']
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
|||
ansible.builtin.set_fact:
|
||||
tomcat_version: 10
|
||||
when:
|
||||
- ansible_distribution_major_version is version_compare('24.04', '==')
|
||||
- ansible_distribution_version is version_compare('24.04', '==')
|
||||
- tomcat_fixed_version is not defined
|
||||
tags: ['tomcat', 'tomcat_ver', 'tomcat_conf', 'tomcat_javamelody']
|
||||
|
||||
|
@ -112,7 +112,7 @@
|
|||
notify: tomcat restart
|
||||
when:
|
||||
- tomcat_use_systemd_unit
|
||||
- ansible_distribution_major_version is version_compare('24.04', '<')
|
||||
- ansible_distribution_version is version_compare('24.04', '<')
|
||||
tags: ['tomcat', 'tomcat_serverxml', 'tomcat_conf']
|
||||
|
||||
- name: tomcat-pkgs | Install the systemd unit
|
||||
|
@ -125,7 +125,7 @@
|
|||
notify: tomcat restart
|
||||
when:
|
||||
- tomcat_use_systemd_unit
|
||||
- ansible_distribution_major_version is version_compare('24.04', '<')
|
||||
- ansible_distribution_version is version_compare('24.04', '<')
|
||||
tags: ['tomcat', 'tomcat_serverxml', 'tomcat_conf']
|
||||
|
||||
- name: tomcat-pkgs | Install a slightly modified catalina.properties
|
||||
|
|
Loading…
Reference in New Issue