-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.yml
78 lines (63 loc) · 1.96 KB
/
setup.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
- hosts: all
sudo: yes
vars:
- GOCD_ADMIN_EMAIL: [email protected]
- GOCD_AGENT_INSTANCES: 2
- nodejs_version: "0.10.22"
- nodejs_install_method: "binary"
- xvbf_enabled: yes
- postgresql_users:
- name: go
pass: go
encrypted: no
- postgresql_user_privileges:
- name: go
db: postgres
role_attr_flags: "CREATEDB"
- nginx_sites:
default:
- listen 8080
- server_name localhost
- root "/testResults/html"
- index /index.html
- location / { try_files $uri $uri/ /index.html /index.htm =404; }
pre_tasks:
- name: install linux-image-extra
apt: name=linux-image-extra-3.13.0-32-generic state=present
tasks:
- name: install git
apt: name=git state=present
- name: install ant
apt: name=ant state=present
- name: install PhantomJS
apt: name=phantomjs state=present
- name: install postgresql-dev dependencies
apt: name=libpq-dev state=present
- name: create /testResults directory and make go the owner
file: path=/testResults state=directory owner=go recurse=yes
- name: check if chromedriver is installed
command: /usr/bin/which chromedriver
ignore_errors: yes
register: chromedriver_path
- include: chromedriver.yml
when: chromedriver_path.rc == 1
- name: make sure XVFB service is started
command: /etc/init.d/xvfb start
- name: add go account to sudoers
lineinfile: dest=/etc/sudoers.d/01go owner=root group=root mode=0440
line="%go ALL=(ALL) NOPASSWD:ALL"
state=present
create=yes
validate='visudo -cf %s'
roles:
- tpbrown.gocd
- ANXS.nodejs
- ANXS.python
- ANXS.postgresql
- Stouts.mongodb
- ThePixelDeveloper.selenium
- ThePixelDeveloper.google-chrome
- alban.andrieu.xvbf
- jdauphant.nginx
- angstwad.docker_ubuntu