blob: 0bb348657ee3753f999b8dec2138b2642e60138a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Configuration for Baserock webserver system image.
#
# This expects to be run on a Fedora 26 cloud image.
---
- hosts: webserver
become: yes
become_method: sudo
tasks:
- name: Install nginx package
apt:
pkg:
- nginx
- libnginx-mod-http-fancyindex
update_cache: yes
- name: Create the nginx configuration files
template:
src: files/{{ item }}
dest: /etc/nginx/sites-available/{{ item }}
become: yes
notify:
- restart nginx
with_items:
- download-baserock-org.conf
- irclogs-baserock-org.conf
- name: Enable nginx sites
file:
src: ../sites-available/{{ item }}
dest: /etc/nginx/sites-enabled/{{ item }}
state: link
become: yes
notify:
- restart nginx
with_items:
- download-baserock-org.conf
- irclogs-baserock-org.conf
- name: install lvm2 tools
apt:
name: lvm2
handlers:
- name: restart nginx
service:
name: nginx
state: restarted
become: yes
|