forked from compmodels/jupyterhub-deploy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
release.yml
45 lines (38 loc) · 1.08 KB
/
release.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
---
- hosts: 127.0.0.1
connection: local
vars_files:
- 'secrets.vault.yml'
- ['vars.local.yml', 'vars.yml']
tasks:
- name: create assignment
make_assignment:
src: '{{ assignment_path }}/{{ assignment }}/release'
name: '{{ assignment }}'
dest: '/tmp/assignment.tar.gz'
overwrite: yes
vars_prompt:
assignment: "Which assignment?"
- hosts: jupyterhub_host
vars_files:
- 'secrets.vault.yml'
- 'users.vault.yml'
- ['vars.local.yml', 'vars.yml']
tasks:
- name: create /srv/assignments
file: path=/srv/assignments state=directory
sudo: yes
- name: upload assignment
copy:
src: '/tmp/assignment.tar.gz'
dest: '/srv/assignments/assignment.tar.gz'
- name: create /srv/skeldir
file: path=/srv/skeldir state=directory
sudo: yes
- name: extract assignment to user directories
release_assignment:
src: '/srv/assignments/assignment.tar.gz'
skeldir: '/srv/skeldir'
users: "{{ students | union(instructors) }}"
overwrite: yes
sudo: yes