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

24 lines
745 B
YAML
Raw Normal View History

2017-01-03 12:41:19 +01:00
---
- name: Check tomcat_instance_name
2017-05-21 19:32:25 +02:00
debug:
2017-01-03 12:41:19 +01:00
msg: "{{ tomcat_instance_name }}"
- name: Check use of gid
command: 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
command: 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
# command: grep '<Connector port="{{ tomcat_instance_port }}" protocol="HTTP/1.1"' $(ls {{ tomcat_instance_root }}/*/conf/server.xml|grep -v {{ tomcat_instance_name }})