Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sathishkumarpkd/21e5fcd465da03d0e8a8ba637e900213 to your computer and use it in GitHub Desktop.
Save sathishkumarpkd/21e5fcd465da03d0e8a8ba637e900213 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: ./shutdown.sh
args:
chdir: /opt/apache-tomcat-8.5.49/bin/
become: true
become_user: tomcat
- name: Remove Tomcat
file:
path: /opt/apache-tomcat-8.5.49
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