Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (28 sloc) 576 Bytes
---
- hosts: webserver
become: true
tasks:
- name: install apache2
apt:
name: "{{item}}"
state: latest
update_cache: yes
with_items:
- apache2
tags:
- apache2
- name: ensure apache2 is running (and enable it at boot)
service:
name: apache2
state: started
enabled: yes
tags:
- apache2
handlers:
- name: restart apache2
service:
name: apache2
state: restarted
tags:
- apache2
- handler