-
Notifications
You must be signed in to change notification settings - Fork 85
/
deploy.yml
46 lines (36 loc) · 1.17 KB
/
deploy.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
---
# The playbook deploys JupyterHub.
# This file would be equivalent to a `sites.yml` file in Ansible terms.
- hosts: jupyterhub_hosts
tasks:
- assert:
that: (ansible_version.major, ansible_version.minor) >= (2, 1)
msg: require ansible >= 2.1, found {{ansible_version.full}}
- command: echo "$PATH"
register: default_path
- hosts: jupyterhub_hosts
tasks:
- name: Make sure we are running on Ubuntu
fail: msg="This ansible setup only work on Ubuntu"
when: ansible_distribution != 'Ubuntu'
- hosts: jupyterhub_hosts
roles:
- common
- python
- role: r
when: install_r_kernel is defined and install_r_kernel
- role: newrelic
when: newrelic_license_key is defined and newrelic_license_key != ''
- nginx
- supervisor
- saveusers
- role: bash
when: install_bash_kernel is defined and install_bash_kernel
- jupyterhub
- role: cull_idle
when: use_cull_idle_servers is defined and use_cull_idle_servers
- role: nbgrader
when: use_nbgrader is defined and use_nbgrader
- role: start_jupyterhub
environment:
PATH: "/opt/conda/bin:{{ default_path.stdout }}"