-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplaybook.yml
74 lines (72 loc) · 2.07 KB
/
playbook.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
---
- hosts: openttd
remote_user: root
tasks:
- name: Upgrade OS
apt:
update_cache: true
upgrade: true
- name: Install dependencies
apt:
name: "{{ item }}"
state: present
with_items:
- ca-certificates
- libsdl1.2debian
- libfontconfig1
- unzip
- name: Download openttd generic binaries
get_url:
url: https://binaries.openttd.org/releases/1.8.0/openttd-1.8.0-linux-generic-amd64.tar.gz
dest: /tmp/openttd.tgz
checksum: sha256:29ebbdc3574b102f90c1e3e6766a78bd50c9bbcedb0627eaf7ee4f82da6f070c
mode: 0755
- name: Creates /opt/openttd directory
file:
path: /opt/openttd
state: directory
- name: Etract game files
unarchive:
src: /tmp/openttd.tgz
dest: /opt/openttd
remote_src: yes
- name: Download openmsx
get_url:
url: http://bundles.openttdcoop.org/openmsx/releases/LATEST/openmsx-0.3.1.zip
dest: /tmp/openmsx.zip
mode: 0755
- name: Download opengfx
get_url:
url: http://bundles.openttdcoop.org/opengfx/releases/LATEST/opengfx-0.5.4.zip
dest: /tmp/opengfx.zip
mode: 0755
- name: Extract opengfx
unarchive:
src: /tmp/opengfx.zip
dest: /opt/openttd/openttd-1.8.0-linux-generic-amd64/baseset
remote_src: yes
- name: Download opensfx
get_url:
url: http://bundles.openttdcoop.org/opensfx/releases/opensfx-0.2.3.zip
dest: /tmp/opensfx.zip
mode: 0755
- name: Create openttd directory
file:
path: /root/.openttd
state: directory
- name: Copy configuration
template:
src: files/openttd.cfg
dest: /root/.openttd/openttd.cfg
- name: Copy systemd unit
template:
src: files/openttd.service
dest: /lib/systemd/system
- name: Reload systemd
systemd: daemon_reload=yes
- name: Enable and start service
systemd:
name: openttd
state: started
enabled: true
masked: no