diff --git a/handlers/main.yml b/handlers/main.yml index 0026850..352e6ab 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -3,8 +3,12 @@ - name: systemctl daemon-reload systemd: daemon_reload: yes + when: + - ansible_virtualization_type != "docker" or tomcat_ignore_docker - name: restart tomcat instance service: name: "{{ instance_name }}" state: restarted + when: + - ansible_virtualization_type != "docker" or tomcat_ignore_docker