-
Notifications
You must be signed in to change notification settings - Fork 14
/
playbook-jenkins.yaml
58 lines (55 loc) · 1.48 KB
/
playbook-jenkins.yaml
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
---
- name: Jenkins Servers and Agents
hosts: jenkins_servers:jenkins_agents
roles:
- role: galaxyproject.general.virtual
tags: general
- role: galaxyproject.general.kernel_params
tags: general
- role: galaxyproject.general.packages
tags: general
- role: galaxyproject.general.users
tags: general
- role: galaxyproject.general.paths
tags: general
- role: galaxyproject.general.copy
tags: general
- role: galaxyproject.postfix
tags: postfix
- name: Jenkins Servers
hosts: jenkins_servers
tasks:
# this is specific to the Debian package
- name: Set $JENKINS_HOME
lineinfile:
path: /etc/default/jenkins
regexp: '^JENKINS_HOME=.*$'
line: "JENKINS_HOME={{ jenkins_home }}"
backup: true
when: jenkins_home is defined
notify: Restart Jenkins
handlers:
- name: Restart Jenkins
service:
name: jenkins
state: restarted
tags: jenkins
- name: Jenkins Agents
hosts: jenkins_agents
roles:
- role: docker
- role: artis3n.tailscale
when: tailscale_authkey is defined and tailscale_authkey is not none
- role: galaxyproject.cvmfs
post_tasks:
- name: Add jenkins user to docker group
user:
name: jenkins
groups: docker
system: true
- name: Allow other access to FUSE mounts
lineinfile:
path: /etc/fuse.conf
regexp: '^#?user_allow_other$'
line: user_allow_other
tags: jenkins