-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathsite.yml
More file actions
63 lines (56 loc) · 1.39 KB
/
site.yml
File metadata and controls
63 lines (56 loc) · 1.39 KB
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
---
# run with `ansible-playbook site.yml`
# NOTES:
# - when starting over, delete known_host entries for instances (54.67.111.226 54.67.33.167 54.153.2.9 54.153.1.99), or ansible will refuse to connect
- hosts: localhost
connection: local
gather_facts: False
tasks:
- include_tasks: roles/common/tasks/ec2.yml
tags:
- always
- boot_jenkins
- name: Common stuff
hosts: all
remote_user: "{{admin_user}}"
become: true
roles:
- common
- name: Install & configure nginx, artifactory, jenkins and scabot on the master
hosts: master
gather_facts: yes
remote_user: "{{admin_user}}"
become: true
roles:
- nginx
- artifactory
- jenkins
- scabot
- name: Configure workers
hosts: worker
gather_facts: yes
remote_user: "{{admin_user}}"
become: true
vars:
- jenkins_home: "/home/jenkins"
roles:
- worker
# To create the inital jenkins config, use `ansible-playbook site.yml --tags boot_jenkins` (after first doing a normal run)
- name: Bootstrap jenkins
hosts: master
gather_facts: yes
remote_user: "{{admin_user}}"
become: true
tasks:
- include_tasks: roles/jenkins/tasks/bootstrap.yml
tags:
- boot_jenkins
- name: Finish jenkins bootstrap using jenkins cli
hosts: localhost
connection: local
gather_facts: False
become: false
tasks:
- include_tasks: roles/jenkins/tasks/bootstrap-cli.yml
tags:
- boot_jenkins