ansible-roles/tomcat-instance/tasks/check.yml

27 lines
837 B
YAML
Raw Permalink Normal View History

2017-01-03 12:41:19 +01:00
---
- name: Check tomcat_instance_name
ansible.builtin.debug:
2017-01-03 12:41:19 +01:00
msg: "{{ tomcat_instance_name }}"
- name: Check use of gid
ansible.builtin.command:
cmd: id -ng "{{ tomcat_instance_port }}"
2017-01-03 12:41:19 +01:00
register: check_port_gid
2023-03-16 14:35:12 +01:00
changed_when: False
2017-05-21 19:32:25 +02:00
failed_when:
- check_port_gid | success
2017-01-03 12:41:19 +01:00
- check_port_gid.stdout != "{{ tomcat_instance_name }}"
- name: Check use of uid
ansible.builtin.command:
cmd: id -nu "{{ tomcat_instance_port }}"
2017-01-03 12:41:19 +01:00
register: check_port_uid
2023-03-16 14:35:12 +01:00
changed_when: False
2017-05-21 19:32:25 +02:00
failed_when:
- check_port_uid | success
2017-01-03 12:41:19 +01:00
- check_port_uid.stdout != "{{ tomcat_instance_name }}"
#- name: Check use of http port
2023-03-27 23:36:35 +02:00
# ansible.builtin.command:
# cmd: grep '<Connector port="{{ tomcat_instance_port }}" protocol="HTTP/1.1"' $(ls {{ tomcat_instance_root }}/*/conf/server.xml|grep -v {{ tomcat_instance_name }})