summaryrefslogtreecommitdiff
path: root/playbooks/tomcat-ctl.yaml
diff options
context:
space:
mode:
authorCarlos Konstanski <ckonstanski@pippiandcarlos.com>2017-12-13 18:54:21 -0700
committerCarlos Konstanski <ckonstanski@pippiandcarlos.com>2017-12-13 18:54:21 -0700
commit32086f62131e1b813e2f3d97bc2c78f66c6a3154 (patch)
tree2005059011aea64121af64de5b3567fd0dcbca3b /playbooks/tomcat-ctl.yaml
parent21fa10807bb475bff42a997ac4add3cc7e6346f9 (diff)
adding files
Diffstat (limited to 'playbooks/tomcat-ctl.yaml')
-rw-r--r--playbooks/tomcat-ctl.yaml30
1 files changed, 30 insertions, 0 deletions
diff --git a/playbooks/tomcat-ctl.yaml b/playbooks/tomcat-ctl.yaml
new file mode 100644
index 0000000..6f1d0c5
--- /dev/null
+++ b/playbooks/tomcat-ctl.yaml
@@ -0,0 +1,30 @@
+---
+- name: "Stop tomcat"
+ service:
+ name: "{{ item.name }}"
+ enabled: yes
+ state: stopped
+ runlevel: "{{ item.runlevel }}"
+ with_items:
+ - { name: tomcat7, runlevel: default }
+ when: action == "stop"
+
+- name: "Start tomcat"
+ service:
+ name: "{{ item.name }}"
+ enabled: yes
+ state: started
+ runlevel: "{{ item.runlevel }}"
+ with_items:
+ - { name: tomcat7, runlevel: default }
+ when: action == "start"
+
+- name: "Restart tomcat"
+ service:
+ name: "{{ item.name }}"
+ enabled: yes
+ state: restarted
+ runlevel: "{{ item.runlevel }}"
+ with_items:
+ - { name: tomcat7, runlevel: default }
+ when: action == "restart"