Open
Description
Describe the bug
When i use remove_webapps option with ROOT, the task "instance | Place neutral default page" fails as soon as it is attempted more than once.
I think the problem comes from the condition :
- instance.remove_webapps is not defined or (instance.remove_webapps is defined and instance.remove_webapps is iterable and "'ROOT' not in instance.remove_webapps")
It seems to work with :
- instance.remove_webapps is not defined or (instance.remove_webapps is defined and instance.remove_webapps is iterable and 'ROOT' not in instance.remove_webapps)
Playbook
Please paste the playbook you are using. (Consider requirements.yml
and
optionally the command you've invoked.)
---
- name: Play tomcat role (ajp_secret)
include_role:
name: robertdebock.tomcat
vars:
# tomcat_address: "127.0.0.1"
tomcat_name: "{{ app_tomcat_name }}"
tomcat_directory: "{{ app_tomcat_directory }}"
tomcat_version: 9
tomcat_user: "{{ app_tomcat_service_user }}"
tomcat_group: "{{ app_tomcat_service_group }}"
tomcat_xms: 256M
tomcat_xmx: 512M
tomcat_non_ssl_connector_port: 8080
tomcat_ssl_connector_port: 8443
tomcat_shutdown_port: 8005
tomcat_ajp_enabled: true
tomcat_ajp_port: "{{ app_ajp_port }}"
tomcat_ajp_secret: "{{ app_ajp_secret }}"
tomcat_jre_home: "{{ app_java_home }}"
tomcat_instances:
- name: "{{ tomcat_name }}"
version: "{{ tomcat_version }}"
user: "{{ tomcat_user }}"
group: "{{ tomcat_group }}"
xms: "{{ tomcat_xms }}"
xmx: "{{ tomcat_xmx }}"
non_ssl_connector_port: "{{ tomcat_non_ssl_connector_port }}"
ssl_connector_port: "{{ tomcat_ssl_connector_port }}"
shutdown_port: "{{ tomcat_shutdown_port }}"
ajp_enabled: "{{ tomcat_ajp_enabled }}"
ajp_port: "{{ app_ajp_port }}" # "{{ tomcat_ajp_port }}"
ajp_secret: "{{ tomcat_ajp_secret }}"
max_post_size: 10485760
# You can pick an address per instance:
# address: "127.0.0.1"
packet_size: 8192
java_opts:
- name: JRE_HOME
value: "{{ tomcat_jre_home }}"
access_log_enabled: "{{ tomcat_access_log_enabled }}"
access_log_directory: "{{ tomcat_access_log_directory }}"
access_log_prefix: "{{ tomcat_access_log_prefix }}"
access_log_suffix: "{{ tomcat_access_log_suffix }}"
access_log_pattern: "{{ tomcat_access_log_pattern }}"
service_state: "{{ tomcat_service_state }}"
service_enabled: "{{ tomcat_service_enabled }}"
remove_webapps:
- docs
- examples
- host-manager
- manager
- ROOT
Output
TASK [robertdebock.tomcat : instance | Place neutral default page] *************
fatal: [debian2]: FAILED! => {changed: false, checksum: c66bd5b4102b2878b5973cfdd51d7ee6d4954060, msg: Destination directory /opt/tomcat/webapps/ROOT does not exist}
Environment
- Control node OS: Debian 12
- Control node Ansible version: 2.17.7
- Managed node OS: Debian 12
Please consider sponsoring me.
Metadata
Metadata
Assignees
Labels
No labels