blob: 57b9edf1e86f75afad94f8617e50d66eeccc6450 (
plain)
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
|
---
- name: Create User
user:
name: woodpecker
home: /var/lib/woodpecker
shell: /bin/bash
system: true
state: present
become: true
- name: Download DEB
get_url:
url: 'https://github.com/woodpecker-ci/woodpecker/releases/download/v{{ woodpecker_ver }}/woodpecker-server_{{ woodpecker_ver }}_amd64.deb'
dest: /var/lib/woodpecker/server.deb
become: true
- name: Install DEB
apt:
deb: /var/lib/woodpecker/server.deb
become: true
notify:
- Handle systemd
- name: Install woodpecker unit file
copy:
src: woodpecker-server.service
dest: /etc/systemd/system/woodpecker-server.service
become: true
notify:
- Handle systemd
- name: Create config file
template:
src: woodpecker.j2
dest: /etc/woodpecker_server
owner: root
group: woodpecker
mode: '640'
become: true
loop:
- '{{ woodpecker_server }}'
notify:
- Handle systemd
|