How to run tomcat catalina script on Ansible

后端 未结 2 1624
你的背包
你的背包 2020-12-10 09:24

I am trying to setup Ansible playbook for tomcat application deployment. Apart from starting tomcat everything works without any issues. When i use startup.sh it works but i

相关标签:
2条回答
  • 2020-12-10 09:36

    The built-in Tomcat management scripts don't detach from the tty, which causes them to be killed when the Ansible ssh session ends. You need to either hack the script to cause it to be backgrounded/detached, or write and install a proper init/systemd script (or crib from any of the numerous examples out there) for Tomcat. For example, here or here or here...

    0 讨论(0)
  • 2020-12-10 09:55

    If you want a quick solution to run tomcat server unattached from Ansible's TTY use the following:

    - name: "Starting Apache server"
      command: nohup {{ apache_install_location }}/tomcat9/bin/startup.sh
    
    0 讨论(0)
提交回复
热议问题