-
Notifications
You must be signed in to change notification settings - Fork 0
/
hpccloud-playbook.yml
58 lines (43 loc) · 1.33 KB
/
hpccloud-playbook.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
---
- hosts: all
vars_files:
- server_var.yml
- mount_vars.yml
- user_vars.yml
- docker_vars.yml
remote_user: ubuntu
become: true
tasks:
# Stop-gap solution for the issue that Ubuntu automatically upgrades
# packages upon first login, thus preventing running this playbook
# on a completely new VM.
- name: Wait for automatic system updates
shell: while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1; do sleep 1; done;
- name: Update apt and install packages
apt:
update_cache: yes
name: [emacs-nox, zsh, csh, tcsh, curl, wget, screen, tmux, net-tools, ufw, whois, git, htop, coreutils, build-essential, acl]
autoremove: yes
- include: mount_storage.yml
loop: "{{ mounts }}"
- include: firewall.yml
# Only include when requiring a new license
# Usually, one should copy the current one from a backup when re-installing the VM
- include: letsencrypt.yml
- include: docker.yml
- include: jupyterhub.yml
- include: nginx.yml
- include: setup_umask.yml
- include: addusers.yml
loop: "{{ users }}"
- include: ssh_access.yml
- include: thredds.yml
- include: vsftpd.yml
- name: Restart nginx and JupyterHub services
block:
- systemd:
name: nginx
state: restarted
- systemd:
name: jupyterhub
state: restarted