-
Notifications
You must be signed in to change notification settings - Fork 0
/
vagrant-provision.yml
84 lines (72 loc) · 1.97 KB
/
vagrant-provision.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
- name: Install and configure stuff already available on SURF Research Cloud before the research-cloud-plugin.yml playbook is run
hosts: all
gather_facts: false
tasks:
- name: Wait for system to become reachable
wait_for_connection:
timeout: 300
- name: Gather facts for first time
setup:
- name: Update APT Cache
apt:
update_cache: yes
- name: Apt upgrade
apt:
upgrade: yes
- name: Nginx
apt:
name: nginx-light
- name: Websocket support
copy:
dest: /etc/nginx/conf.d/websocket.conf
mode: 0644
content: |
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
- name: /etc/nginx/app-location-conf.d
file:
path: /etc/nginx/app-location-conf.d
mode: 0755
state: directory
- name: Site
copy:
dest: /etc/nginx/sites-enabled/default
mode: 0644
content: |
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
server_name _;
include /etc/nginx/app-location-conf.d/*.conf;
}
- name: Restart nginx
systemd:
name: nginx
state: restarted
- name: Format home2 disk
filesystem:
dev: /dev/sdb
fstype: ext4
- name: Format cache disk
filesystem:
dev: /dev/sdc
fstype: ext4
- name: Mount cache as /data/volume_2
mount:
path: /data/volume_2
src: /dev/sdc
fstype: ext4
state: mounted
- name: Mount home as /data/volume_3
mount:
path: /data/volume_3
src: /dev/sdb
fstype: ext4
state: mounted
- name: Next
debug:
msg: Next is to call the ansible command to provision the eWatercycle platform. See README.md#local-test-vm