Ansible-playbook to start tomcat on windows

1.88K viewsansible ansible-playbook

Ansible-playbook to start tomcat on windows

How can I start tomcat service on windows using ansible-playbook? I have installed ansible using cygwin by following this tutorial.

Share:
vito Answered question March 8, 2021
0

You need to use the win_service module to modify any service in Windows using ansible. Below is the sample playbook to start the Tomcat9 service,

---
- hosts: win
  tasks: 
  - name: Start tomcat 
    win_service: 
      name: Tomcat9 
      state: started

Change the service name as per the Tomcat version you have installed.

Share:
hiberstackers Edited answer April 30, 2021
0
You are viewing 1 out of 1 answers, click here to view all answers.