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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
---
- name: Configure my FreeBSD home server
hosts: hosts
pre_tasks:
- name: Fail if secrets.yml wasn't loaded and smtp_user is missing
assert:
that:
- smtp_user != ''
fail_msg: >
Required variables are missing. Did you forget to create a secrets.yml file?
vars:
ansible_assert_no_log: true
vars_files:
- secrets.yml
vars:
lan_ipv4_cidr: 192.168.0.10/16
lan_ipv4_network: 192.168.0.0/16
lan_ipv4_gateway: 192.168.0.1
lan_search_domain: local.jan.systems
jail_userland_14_3: 14.3-RELEASE
jail_userland_15_0: 15.0-RELEASE
jails:
- { userland: "{{ jail_userland_14_3 }}", num: 1, name: ingress }
- { userland: "{{ jail_userland_14_3 }}", num: 2, name: postgres }
- { userland: "{{ jail_userland_14_3 }}", num: 3, name: irc_thelounge }
- { userland: "{{ jail_userland_14_3 }}", num: 4, name: taulubot }
- { userland: "{{ jail_userland_14_3 }}", num: 5, name: homepage }
- { userland: "{{ jail_userland_14_3 }}", num: 6, name: hommabot }
- { userland: "{{ jail_userland_14_3 }}", num: 7, name: aggro }
- { userland: "{{ jail_userland_14_3 }}", num: 8, name: diddle }
- { userland: "{{ jail_userland_15_0 }}", num: 9, name: redis }
- { userland: "{{ jail_userland_15_0 }}", num: 10, name: samba }
- { userland: "{{ jail_userland_14_3 }}", num: 11, name: spliit }
- { userland: "{{ jail_userland_15_0 }}", num: 12, name: goaccess }
- { userland: "{{ jail_userland_15_0 }}", num: 13, name: plex }
- { userland: "{{ jail_userland_14_3 }}", num: 14, name: freshrss }
- { userland: "{{ jail_userland_14_3 }}", num: 15, name: paste }
- { userland: "{{ jail_userland_15_0 }}", num: 16, name: dl }
- { userland: "{{ jail_userland_15_0 }}", num: 17, name: syncthing }
- { userland: "{{ jail_userland_15_0 }}", num: 18, name: komga }
- { userland: "{{ jail_userland_15_0 }}", num: 19, name: leolalla_fi }
ingress_ip: "{{ jail_lan_prefix }}.{{ 1 + jail_ip_offset }}"
ingress_routes:
- { host: jan.systems, jail: homepage }
- { host: jantuomi.fi, redirect: jan.systems }
- { host: aggro.jan.systems, jail: aggro }
- { host: diddle.jan.systems, jail: diddle }
- { host: spliit.jan.systems, jail: spliit }
- { host: freshrss.jan.systems, jail: freshrss }
- { host: irc.jan.systems, jail: irc_thelounge }
- { host: paste.jan.systems, jail: paste }
- { host: leolalla.fi, jail: leolalla_fi }
- { host: immich.jan.systems, ip: 192.168.3.3, port: 2283 } # vms aren't configured in ansible
- { host: plex.jan.systems, jail: plex, port: 32400 }
- { host: komga.jan.systems, jail: komga, port: 25600 }
cert_domains:
- "jan.systems"
- "*.jan.systems"
- "jantuomi.fi"
- "*.jantuomi.fi"
- "leolalla.fi"
- "*.leolalla.fi"
cert_name: "{{ cert_domains[0] }}"
contact_email: jan@jantuomi.fi
tasks:
- name: Run general tasks
tags: [general]
import_tasks: tasks/general.yml
- name: Run network tasks
tags: [network]
import_tasks: tasks/network.yml
- name: Run email tasks
tags: [email]
import_tasks: tasks/email.yml
when: not is_test_vm
- name: Run ZFS tasks
tags: [zfs]
import_tasks: tasks/zfs.yml
when: not is_test_vm
- name: Run common jails tasks
tags: [jails]
import_tasks: tasks/jails.yml
- name: Run ingress jail tasks
tags: [jail_ingress]
import_tasks: tasks/jail_ingress.yml
- name: Run postgres jail tasks
tags: [jail_postgres]
import_tasks: tasks/jail_postgres.yml
- name: Run diddle jail tasks
tags: [jail_diddle]
import_tasks: tasks/jail_diddle.yml
- name: Run hommabot jail tasks
tags: [jail_hommabot]
import_tasks: tasks/jail_hommabot.yml
- name: Run homepage jail tasks
tags: [jail_homepage]
import_tasks: tasks/jail_homepage.yml
|