library/roles/tomcat-multiple-instances: Optionally add the IP address to the JMX options.
This commit is contained in:
parent
b53378354f
commit
33ada02ff7
|
@ -76,6 +76,7 @@ tomcat_m_jmx_port: 8186
|
|||
# The following works with jdk >= 7.0.25 only
|
||||
tomcat_m_jmx_disable_additional_ports: True
|
||||
tomcat_m_jmx_localhost_only: False
|
||||
tomcat_m_jmx_ip_address: '{{ ansible_default_ipv4.address }}'
|
||||
|
||||
#tomcat_m_jmx_auth_dir: '{{ tomcat_m_instances_base_path }}'
|
||||
# tomcat_m_jmx_monitorpass: define_in_a_vault_file
|
||||
|
|
|
@ -33,7 +33,9 @@ JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=true"
|
|||
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.ssl=false"
|
||||
{% endif %}
|
||||
{% if item.jmx_localhost_only is defined and item.jmx_localhost_only %}
|
||||
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.local.only=true"
|
||||
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.local.only=true -Djava.rmi.server.hostname=127.0.0.1"
|
||||
{% else %}
|
||||
JAVA_OPTS="${JAVA_OPTS} -Djava.rmi.server.hostname={{ tomcat_m_jmx_ip_address }}"
|
||||
{% endif %}
|
||||
{% if item.jmx_auth_enabled is defined and item.jmx_auth_enabled %}
|
||||
JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote.password.file={{ item.jmx_auth_dir }}/jmxremote.password -Dcom.sun.management.jmxremote.access.file={{ item.jmx_auth_dir }}/jmxremote.access"
|
||||
|
|
Loading…
Reference in New Issue