Skip to content

Instantly share code, notes, and snippets.

@anujdevopslearn
Last active May 17, 2024 23:14
Show Gist options
  • Save anujdevopslearn/7f44b4505caa46da6b4bd66241044039 to your computer and use it in GitHub Desktop.
Save anujdevopslearn/7f44b4505caa46da6b4bd66241044039 to your computer and use it in GitHub Desktop.
---
- hosts: webservers
tasks:
- name: Make sure that we can connect to the machine
ping:
- name: Stop Tomcat
shell: /opt/apache-tomcat-8.5.88/bin/shutdown.sh
- name: Remove Tomcat
file:
path: /opt/apache-tomcat-8.5.88
state: absent
- name: remove user "tomcat"
user:
name: tomcat
state: absent
- name: remove group "tomcat"
group:
name: tomcat
state: absent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment