diff options
| author | Carlos Konstanski <ckonstanski@pippiandcarlos.com> | 2017-12-13 18:54:21 -0700 |
|---|---|---|
| committer | Carlos Konstanski <ckonstanski@pippiandcarlos.com> | 2017-12-13 18:54:21 -0700 |
| commit | 32086f62131e1b813e2f3d97bc2c78f66c6a3154 (patch) | |
| tree | 2005059011aea64121af64de5b3567fd0dcbca3b /playbooks/apache-ctl.yaml | |
| parent | 21fa10807bb475bff42a997ac4add3cc7e6346f9 (diff) | |
adding files
Diffstat (limited to 'playbooks/apache-ctl.yaml')
| -rw-r--r-- | playbooks/apache-ctl.yaml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/playbooks/apache-ctl.yaml b/playbooks/apache-ctl.yaml new file mode 100644 index 0000000..cada6c7 --- /dev/null +++ b/playbooks/apache-ctl.yaml @@ -0,0 +1,30 @@ +--- +- name: "Stop apache" + service: + name: "{{ item.name }}" + enabled: yes + state: stopped + runlevel: "{{ item.runlevel }}" + with_items: + - { name: apache2, runlevel: default } + when: action == "stop" + +- name: "Start apache" + service: + name: "{{ item.name }}" + enabled: yes + state: started + runlevel: "{{ item.runlevel }}" + with_items: + - { name: apache2, runlevel: default } + when: action == "start" + +- name: "Restart apache" + service: + name: "{{ item.name }}" + enabled: yes + state: restarted + runlevel: "{{ item.runlevel }}" + with_items: + - { name: apache2, runlevel: default } + when: action == "restart" |
