-
Notifications
You must be signed in to change notification settings - Fork 4
/
vagrant.yml
executable file
·47 lines (39 loc) · 943 Bytes
/
vagrant.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
#!/usr/bin/env ansible-playbook
---
- name: Provision on Vagrant
hosts: localhost
connection: local
gather_facts: no
roles:
- userlist
post_tasks:
- meta: refresh_inventory
- name: Create cookie_secret
shell: openssl rand -hex 1024 > ./security/cookie_secret
- name: Install and configure jupyterhub on vagrant box.
hosts: vagrant
connection: ssh
become: yes
gather_facts: no
vars_files:
- "group_vars/all"
pre_tasks:
- name: Install python in raw mode
raw: sudo apt-get install -y python
- name: Load usernames into memory
include_vars: "./userlist.yml"
no_log: yes
- name: 'Add users to the server'
user:
name: "{{ item.username }}"
password: "{{ item.pwd | password_hash('sha512') }}"
no_log: yes
with_items: "{{ users }}"
roles:
- common
- python
- supervisor
- jupyterhub
- r
- julia
- nginx