forked from compmodels/jupyterhub-deploy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
return.yml
44 lines (37 loc) · 1.03 KB
/
return.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
---
- hosts: 127.0.0.1
connection: local
vars_files:
- 'secrets.vault.yml'
- ['vars.local.yml', 'vars.yml']
tasks:
- name: create feedback
make_feedback:
src: '{{ assignment_path }}/{{ assignment }}/feedback'
name: '{{ assignment }}'
dest: '/tmp/feedback.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: remove existing feedback
file: path=/srv/assignments/feedback state=absent
sudo: yes
- name: create /srv/assignments/feedback
file: path=/srv/assignments/feedback state=directory
sudo: yes
- name: upload and extract feedback
unarchive:
src: '/tmp/feedback.tar.gz'
dest: '/srv/assignments/feedback'
sudo: yes
- name: extract feedback to user directories
return_feedback:
src: '/srv/assignments/feedback'
overwrite: no
sudo: yes