-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathplaybook-jenkins.yaml
More file actions
78 lines (75 loc) · 2.17 KB
/
playbook-jenkins.yaml
File metadata and controls
78 lines (75 loc) · 2.17 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
- 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.systemd
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
# # The file is still created but is ignored?
# #- 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
# #- name: Create Jenkins systemd override directory
# # ansible.builtin.file:
# # path: /etc/systemd/system/jenkins.service.d
# # state: directory
# # mode: "0755"
# # owner: root
# # group: root
# # when: jenkins_home is defined
# #- name: Set $JENKINS_HOME
# # ansible.builtin.copy:
# # content: |
# # [Service]
# # Environment="JENKINS_HOME={{ jenkins_home }}"
# # WorkingDirectory={{ jenkins_home }}
# # 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