-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvagrant-provision.yml
More file actions
61 lines (52 loc) · 1.47 KB
/
vagrant-provision.yml
File metadata and controls
61 lines (52 loc) · 1.47 KB
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
- name: Install and configure stuff already available on SURF Research Cloud before the research-cloud-plugin.yml playbook is run
hosts: all
gather_facts: true
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: Next
debug:
msg: Next is to call the ansible command to provision the AMUSE workspace.