-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathblackboard-binder.yml
49 lines (41 loc) · 1.45 KB
/
blackboard-binder.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
---
- name: "Provision blackboard-binder server using vagrant"
hosts: all
become: yes
tasks:
- name: "Install app pip dependencies to virtualenv"
pip: requirements=/vagrant/requirements.txt state=present
when: ansible_ssh_user == "vagrant"
- name: "Install app pip dependencies to virtualenv"
pip: requirements=/vagrant/requirements.txt state=present
when: ansible_ssh_user != "vagrant"
- name: "Install apps using apt-get"
apt: name={{item}} state=present update_cache=yes
with_items:
- libxml2
- libxml2-dev
- libxslt1-dev
- python-dev
- chromium-browser
- python-pip
- python
- python-lxml
- libffi-dev
- libssl-dev
- unzip
- xvfb
- name: "Download chromedriver for selenium"
get_url: url=http://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip dest=/tmp/chromedriver_linux64.zip
- name: "Unzip chromedriver"
unarchive:
src=/tmp/chromedriver_linux64.zip
dest=/usr/bin/
copy=no
- name: "Set file permissions for chromedriver"
file: path=/usr/bin/chromedriver state=file mode=777
- name: "Run Headless Selenium setup script"
shell: "/vagrant/headless_setup.sh"
when: ansible_ssh_user == "vagrant"
- name: "Run Headless Selenium setup script"
shell: "{{playbook_dir}}/headless_setup.sh"
when: ansible_ssh_user != "vagrant"