Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disable neutral root page #39

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ tomcat_instances:
access_log_pattern: "{{ tomcat_access_log_pattern }}"
service_state: "{{ tomcat_service_state }}"
service_enabled: "{{ tomcat_service_enabled }}"
neutral_default_page: "{{ tomcat_neutral_default_page }}"

# Deploy a neutral default page
tomcat_neutral_default_page: yes

# The explicit version to use when referring to the short name.
tomcat_version7: 7.0.107
Expand All @@ -80,3 +84,4 @@ _tomcat_unarchive_urls:
url: "{{ tomcat_mirror }}/dist/tomcat/tomcat-9/v{{ tomcat_version9 }}/bin/apache-tomcat-{{ tomcat_version9 }}.tar.gz"

tomcat_unarchive_url: "{{ _tomcat_unarchive_urls[tomcat_version].url }}"
...
3 changes: 3 additions & 0 deletions tasks/instance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
owner: "{{ instance.user | default(tomcat_user) }}"
group: "{{ instance.group | default(tomcat_group) }}"
mode: "0640"
when:
- instance.neutral_default_page is defined
- instance.neutral_default_page

- name: loop over config_files
ansible.builtin.include: config_file.yml
Expand Down
7 changes: 6 additions & 1 deletion templates/server.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,12 @@
</Realm>

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
unpackWARs="true" autoDeploy="{{ instance.autodeploy|default("true") }}">

{% if instance.context is defined %}
<Context path="{{ instance.context.path }}" docBase="{{ instance.context.docBase }}"
debug="{{ instance.context.debug|default("0") }}" reloadable="{{ instance.context.reloadable|default("true") }}" />
{% endif %}

<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
Expand Down