Skip to content

Commit 4770402

Browse files
authored
Fix for #641 and added debug (#644)
Merging this as I'm sick of doing manually... :-)
1 parent 648f02f commit 4770402

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

ansible/roles/tomcat/tasks/main.yml

+19
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@
142142
tags:
143143
- tomcat
144144

145+
- name: "Show tomcat and distro"
146+
debug:
147+
msg: "Using distro {{ansible_distribution_version}} and {{tomcat}}"
148+
tags:
149+
- tomcat
150+
145151
- name: configure tomcat (Debian)
146152
blockinfile:
147153
path={{tomcat_conf}}
@@ -155,6 +161,19 @@
155161
- tomcat
156162
- tomcat-security
157163

164+
- name: configure tomcat (Debian) in 18.04
165+
blockinfile:
166+
path={{tomcat_conf}}
167+
marker="# {mark} Configure Tomcat Memory (Ansible managed)"
168+
block='JAVA_OPTS="-Djava.awt.headless=true -XX:+UseG1GC {{tomcat_java_opts}} {{java_security_opts}}"'
169+
backup=yes
170+
notify:
171+
- restart tomcat
172+
when: ansible_os_family == "Debian" and ansible_distribution_version == "18.04" and tomcat == "tomcat9"
173+
tags:
174+
- tomcat
175+
- tomcat-security
176+
158177
- name: Set JAVA_HOME (Debian)
159178
lineinfile: "
160179
dest={{tomcat_conf}}

0 commit comments

Comments
 (0)