-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdroid.yml
58 lines (56 loc) · 1.67 KB
/
droid.yml
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
49
50
51
52
53
54
55
56
57
58
description: "Configure Apache 2 Virtual Hosts"
variables:
use_legacy_templating: true
module_apache_vhost_items: []
# An example vhost item:-
# -
# name: "test.example.com"
# socket: "*:80"
# servername: "test.example.com"
# docroot: "/var/www/test.example.com"
# env:
# - SOME_ENV AValueThatDoesNotContainSpaces
# - SECRET "This is a secret message."
tasks:
-
name: "Copy site config to sites-available"
command: "fs:copy"
sudo: true
arguments:
src: "!{{ mod_path }}/assets/apache-vhost.conf.template"
dest: "/etc/apache2/sites-available/{{ item.name }}.conf"
with_items:
module_apache_vhost_items
-
name: "Create the document root directory"
command: "fs:mkdir"
sudo: true
arguments:
directory: "{{ item.docroot }}"
with_items_filter: "item['placeholder']"
with_items:
module_apache_vhost_items
-
name: "Copy a placeholder index page to the document root directory"
command: "fs:copy"
sudo: true
arguments:
src: "!{{ mod_path }}/assets/index.html.template"
dest: "{{ item.docroot }}/index.html"
with_items_filter: "item['placeholder']"
with_items:
module_apache_vhost_items
-
name: "Enable the vhost configuration"
command: "apache:ensite"
sudo: true
arguments:
site-name: "{{ item.name }}"
with_items:
module_apache_vhost_items
-
name: "Reload the Apache2 service"
command: "service:reload"
sudo: true
arguments:
name: "apache2"