Compare commits
589 commits
actions-te
...
master
Author | SHA1 | Date | |
---|---|---|---|
14c7189429 | |||
1ff80f9171 | |||
ec8ae902ed | |||
c88f8e6374 | |||
c95c7d1308 | |||
e6fe9af993 | |||
d4e9c308e2 | |||
2ef627998f | |||
b1481de12c | |||
c820614f44 | |||
190a377076 | |||
20c91fad84 | |||
d4d68dc962 | |||
48beb781b3 | |||
e790276359 | |||
ae59e21a2e | |||
ed4debd59d | |||
bb572040ef | |||
2fedbd505b | |||
f114a2d5d9 | |||
4c9a7dbcfb | |||
211e04ae99 | |||
2b8b9f69f7 | |||
bfa4167822 | |||
4772b948fa | |||
5cedf628c8 | |||
ededecd167 | |||
46a15fb9ce | |||
a7860a0104 | |||
043104f062 | |||
d6cc79dcb3 | |||
95c66d976f | |||
776b562abe | |||
d282b132ab | |||
56ed9010ac | |||
b6bceb64a4 | |||
c2a39ecc56 | |||
1aaf78c3ab | |||
ffe43b8498 | |||
cf87333ef8 | |||
020b2afa0d | |||
36947f349b | |||
5bed083800 | |||
ba2770c696 | |||
b02af6f9e6 | |||
9a5f632ce4 | |||
c479b7fcea | |||
4031afdbdb | |||
bbe61d4180 | |||
ae7ec4680f | |||
4c7c0e3261 | |||
a793f59a33 | |||
5f412a50c5 | |||
d4d11508bc | |||
6cba945cb8 | |||
21e0c49593 | |||
57e43b1396 | |||
5c7bb11c0c | |||
b6f4b8cd51 | |||
cc7698436f | |||
f3d9e52f7e | |||
821e783702 | |||
423cafe98d | |||
39e504dd61 | |||
80ac346c4e | |||
a226b1d560 | |||
5fdeef32e8 | |||
eaf1b3ffb9 | |||
1ae9d88346 | |||
b3ebfa71e7 | |||
d2fb048b7d | |||
db91fe6345 | |||
dff8b4d72b | |||
4325511f35 | |||
a729049060 | |||
34624667dc | |||
56d15d0cf1 | |||
2468b1ffcd | |||
12cb205ff5 | |||
13eed06124 | |||
3328152314 | |||
07a6e1b124 | |||
a935deb439 | |||
45557e0bc1 | |||
0530194ac0 | |||
20f1af0ee4 | |||
dc9a3a0725 | |||
2c423fc0ca | |||
71a69af472 | |||
eaead4bc7f | |||
139ef2183c | |||
981b954682 | |||
872115a9a9 | |||
243574e415 | |||
f0b1b064db | |||
ad625d47d6 | |||
27fbb3eca6 | |||
5832a12084 | |||
5a4a6de8be | |||
20626d18d5 | |||
11fbb4a720 | |||
943ad5ef8b | |||
ee6fbb48c7 | |||
d9b6c2d27f | |||
04b98d5b7f | |||
e2fdee682d | |||
ec1b8cb9e6 | |||
8b90b85b8f | |||
11e094eeda | |||
a0a70e4289 | |||
d0699117bc | |||
0e570efebd | |||
1a71f92138 | |||
a5dafee6cb | |||
34daaee91e | |||
fa42610bff | |||
8742d750a3 | |||
ec405bb1c0 | |||
8b7d8da733 | |||
b116d3e2c0 | |||
53f30103b3 | |||
74a517f942 | |||
d0d9f3430a | |||
b6131534f6 | |||
af5655e131 | |||
338f4e2f0d | |||
c3497c2440 | |||
7a6e4e596f | |||
c8bbd563b4 | |||
cdd1495f0c | |||
e1dd03e859 | |||
964e841c1d | |||
271eb09669 | |||
ae491f8977 | |||
d4bfc7586f | |||
107a2cd48b | |||
86551d6dec | |||
4739a3758d | |||
231fe0103a | |||
974595756c | |||
f6a8776a6e | |||
8a9fd29c72 | |||
ec4812a157 | |||
0579a20768 | |||
f0c66b63f3 | |||
7b6edbfe44 | |||
1bc3805ded | |||
b576f18c93 | |||
fff5b5a431 | |||
d9c5d73889 | |||
9a5cd91532 | |||
fa7402a8eb | |||
a1db16b329 | |||
9696f406ce | |||
e02e45c8a6 | |||
cc0a16e3ee | |||
29e747db42 | |||
9d5d05e713 | |||
868041257d | |||
ba98d5223b | |||
85c882043c | |||
e3d702ecaf | |||
68965cd57f | |||
47157118e7 | |||
eb1478abcb | |||
7ee2572e04 | |||
a8841252d1 | |||
ad5cf29b12 | |||
fd0e1bc028 | |||
2153bd8452 | |||
22ef6bbc0a | |||
a855e1fcaa | |||
f886060227 | |||
10f47b45e0 | |||
a0f7145f9c | |||
e9372af0aa | |||
84daad7b79 | |||
649cf7b22d | |||
504cb33a94 | |||
990d3ed176 | |||
aa4b46465c | |||
0adad8fa18 | |||
0a861b0b8e | |||
632f34ec1a | |||
81252de145 | |||
cfcdb4e935 | |||
2dd0fb75c9 | |||
ad85a0c46b | |||
82a91857d0 | |||
8dd1e61c3b | |||
4756acbaf0 | |||
10d87f35d5 | |||
9babcce554 | |||
3efe44b50b | |||
46c41d2d77 | |||
1bab946019 | |||
c534d83e04 | |||
9fd303c4ad | |||
112ad23a66 | |||
1e2e45551e | |||
d6e857fd84 | |||
121687ad7c | |||
9d6418ca71 | |||
0cc512ca9a | |||
8f4cc59542 | |||
050eee3f23 | |||
e51363ed8a | |||
e9752c560a | |||
70629e547e | |||
ba7086f3b1 | |||
f4cc662c1a | |||
5f38645fee | |||
e630255364 | |||
ab066a81b7 | |||
6b24643f62 | |||
da76cec862 | |||
a64d1b0fa7 | |||
31473548e1 | |||
7089f38999 | |||
8a3e283c27 | |||
2f6ca52acd | |||
ac765ed6f2 | |||
e5e2604a68 | |||
2bf1320e3c | |||
856f5b286c | |||
381a7bd226 | |||
b1d5d2c7f2 | |||
4775bb8947 | |||
6e72234b1d | |||
11ddc0397a | |||
0c06d1b651 | |||
58c7f89448 | |||
afdec531dd | |||
54775e72e9 | |||
215823b6b2 | |||
fb3608fa6e | |||
0be436e8b0 | |||
770d6a74d3 | |||
205b82f1d8 | |||
3b1c65ad82 | |||
72de1a5478 | |||
fff2153a8a | |||
d11b2a17e3 | |||
b62ef00392 | |||
7e062a9592 | |||
8c042d5ba8 | |||
773dff1aa9 | |||
2c63423a9a | |||
76c7a2a511 | |||
ff42297fad | |||
2a4af75d53 | |||
4f408bac9d | |||
5865d0da5c | |||
78319d29b5 | |||
0a0d966d08 | |||
b16dcb8329 | |||
b0ca80f4c2 | |||
68114937c6 | |||
04be788c09 | |||
4eddc7498c | |||
e617040bfd | |||
4b27e6c316 | |||
aaeae7002a | |||
58bde398c0 | |||
13840dd12a | |||
b5224f7733 | |||
e9c9f0a47c | |||
119ecd3e0a | |||
84f8549145 | |||
8cef5964ba | |||
f8cbdb29a1 | |||
bd8ae569f2 | |||
7643d02c5e | |||
c4db933785 | |||
264594636f | |||
884e276aae | |||
78485bc490 | |||
d747f3a150 | |||
7ac216baf8 | |||
c7606378f2 | |||
8ad160b046 | |||
ed5bc5028b | |||
be4f2cfce5 | |||
991a129f28 | |||
a92d72034e | |||
9982ee4386 | |||
acf2853223 | |||
13e602a76d | |||
71c5229adb | |||
de94e75549 | |||
c9e8ec6d7c | |||
3127ddf841 | |||
e60c786b76 | |||
849b4ab887 | |||
b692084f16 | |||
1534104bf4 | |||
db996daf14 | |||
5e5ebf937c | |||
788c9fa453 | |||
e233860b7b | |||
195d9c3b03 | |||
6dd5cfa681 | |||
0eeed22092 | |||
750b3bab7d | |||
8ef5f5b18e | |||
813146b106 | |||
023257ae55 | |||
66c25d20b8 | |||
1b9b9962a7 | |||
c08a8158f7 | |||
9f69d421f2 | |||
20d91ff1b0 | |||
dc2a6f5788 | |||
bb8b486263 | |||
2d7113f6e6 | |||
5fd1b776be | |||
62463860e4 | |||
eb4a2fa842 | |||
ce72d0d17a | |||
d0f8144753 | |||
96f28d63cc | |||
a2fe24955b | |||
a25cd83e94 | |||
e20873cbd3 | |||
f4b34de6c4 | |||
da371980aa | |||
c06d3cdc7e | |||
91f1fe3fbc | |||
2a750a57f3 | |||
42fddcc278 | |||
e35f425d07 | |||
8aa7a8aaa2 | |||
2ac7370613 | |||
7c7b632fc8 | |||
ce46c5fb90 | |||
eb1b324c8d | |||
fd495036f2 | |||
3b2c2a453e | |||
2329b5d5e6 | |||
cdbd70ec1d | |||
8c93ba043d | |||
885c01ebaa | |||
b2da9de4d6 | |||
191e322e9e | |||
d7527a8a6f | |||
518e522a50 | |||
80b7a7c97f | |||
f08c478bf6 | |||
a275cadcbd | |||
4ae88c17a0 | |||
9309a901e3 | |||
f512d8e83e | |||
8cd80becd7 | |||
5ba21ae4bf | |||
29c989711c | |||
9cb17a88c7 | |||
8ef3592786 | |||
567691c3c4 | |||
d050c5c723 | |||
4d127f05e7 | |||
646aada779 | |||
0a724359dc | |||
5dc08701b2 | |||
f3293d4b05 | |||
cd8e979ded | |||
febee5c72e | |||
5cd6edc1b1 | |||
8752c36391 | |||
1a3e1dbeeb | |||
1520f8dabf | |||
0d72e9e920 | |||
7496125098 | |||
e2fb492195 | |||
e57cd06891 | |||
583b106d39 | |||
50f02e85ac | |||
604ae20554 | |||
6d3b1e1538 | |||
433a9114df | |||
5aa57c8358 | |||
ea8db3ab6b | |||
d8cf025fbe | |||
315d89c750 | |||
5f4f8e35aa | |||
61e8ebdd20 | |||
55aed1a36d | |||
365d0af6a6 | |||
b1c3597fa9 | |||
7ce6d58923 | |||
df2573a650 | |||
917674bac8 | |||
0618cde4d1 | |||
122e27518b | |||
7f5a66e6c8 | |||
a7432b2208 | |||
6e4cbe8b40 | |||
92ca4fcba4 | |||
1952f5f96e | |||
1f10474860 | |||
7489a0c895 | |||
8df5271acc | |||
eba736f107 | |||
8465cf1d8b | |||
6e58bc2a60 | |||
cd1f83bb68 | |||
7ba39e01c7 | |||
cbe78a3bd0 | |||
6bef2b0165 | |||
ead2775c41 | |||
a3de09e2f2 | |||
525565073b | |||
b229c17718 | |||
cb39610019 | |||
7229b6bad7 | |||
0a00748732 | |||
dfe1ea7db3 | |||
ec3b486e7c | |||
7c9727c6a6 | |||
778f8e99d7 | |||
3288f9ec58 | |||
427fbd9fc4 | |||
a81b15edcd | |||
55a9a77e71 | |||
546f091e91 | |||
6c661f75b8 | |||
8a4b96d06d | |||
171aa216d6 | |||
a632b3efbf | |||
04575b20ee | |||
f427936708 | |||
fc5d157916 | |||
1f3e76e4f6 | |||
8bc5793d70 | |||
5751c77b8f | |||
31c8b7aa6a | |||
e39fc8c992 | |||
641e66237e | |||
e21e372dc4 | |||
caf6b54774 | |||
bf8c5532cb | |||
58a90d692b | |||
1e55576ba3 | |||
7f7532ccde | |||
f141ca0af9 | |||
1ff4842775 | |||
8136e10758 | |||
09b2156d78 | |||
bf10bc5c6c | |||
31d00d0b9d | |||
cdc505274d | |||
4e5fb25a7a | |||
d88de75b88 | |||
c826d36d0d | |||
8a7159c0c4 | |||
47ee78221f | |||
11c8da0558 | |||
2eb65f713f | |||
c91568cd7e | |||
470010aa0a | |||
e1604ce193 | |||
8242f11125 | |||
04ff09e3bf | |||
2da1995a73 | |||
7a3a385eb5 | |||
a0bee46545 | |||
cb7ca70d16 | |||
cb0d0a949d | |||
93128bb624 | |||
3bcc12a16d | |||
5a8fca650c | |||
cdd7e82b6a | |||
69ebc89858 | |||
7a02a28d0f | |||
adbc274797 | |||
5900c39b59 | |||
d22236f5df | |||
e5d0752812 | |||
c98c7fd7bb | |||
98d52e577a | |||
e43dd2a26e | |||
2247ce1d16 | |||
23d8b9bcdc | |||
89a0cbddbf | |||
eead221046 | |||
b04edceb13 | |||
79ecf7277f | |||
2b475bf8ce | |||
c7c77fcb0b | |||
a4bbc54380 | |||
e00ce3cb1c | |||
a4660f69cf | |||
8c66c9a6a0 | |||
ad187f51e3 | |||
270da668c3 | |||
3fdbd62aca | |||
ee6d3b4d52 | |||
4594bb6083 | |||
0ed96a14f5 | |||
7cf2ad1f5a | |||
023af1ae91 | |||
0eff4dd804 | |||
5026dddb1e | |||
84e42378b5 | |||
7928d5fdb3 | |||
5244f36adb | |||
42d604a921 | |||
624ad96c8a | |||
f6e2e4fe24 | |||
929738af88 | |||
7ee84bffd9 | |||
ae27f5cc67 | |||
94dc909bd9 | |||
f0656502af | |||
8e9a7fd4fc | |||
c2603ef8d8 | |||
6e2fd35622 | |||
03def639d5 | |||
c8afd02fb2 | |||
fa469574b7 | |||
8b2696de1a | |||
affcf7f572 | |||
b7a3415352 | |||
e2c59bc220 | |||
4fb04065f9 | |||
2119f96382 | |||
15c612cb3b | |||
39fad6ed05 | |||
317622a01d | |||
644fcbe638 | |||
86d076ebc6 | |||
1e973b3dde | |||
86a7b60b46 | |||
5f170a6caf | |||
70cdfd4612 | |||
ee25d32b60 | |||
ee2f2154be | |||
ae000b791b | |||
e7f363cda5 | |||
77df67fd66 | |||
baab3192b0 | |||
04e140c8d5 | |||
eb90c60317 | |||
d7b9f69dd0 | |||
0db76e1481 | |||
42f725d6f8 | |||
c653ac3f2f | |||
a92546e667 | |||
9770232f66 | |||
b2339cd877 | |||
f701cfd4c9 | |||
c077b5a41a | |||
0d621444c9 | |||
3a39e40710 | |||
a231ea1ece | |||
31152b904a | |||
a78ac15a72 | |||
7f3bb95d2f | |||
b6754d49e7 | |||
61e057a7e9 | |||
5fc2d161ad | |||
31b38dfc2f | |||
f664e0271b | |||
946c7d0772 | |||
5ec34f54c8 | |||
9025755695 | |||
3d0cf42e8e | |||
7516f5813e | |||
d7edba1a0f | |||
1fdce68b75 | |||
f831973023 | |||
20fb7aeacf | |||
9b1aa236c5 | |||
051acc86cc | |||
f573704b34 | |||
112d900b8f | |||
45c124a82b | |||
4846fc9bf5 | |||
4a09185aeb | |||
08fbb13640 | |||
07125310bd | |||
6b2e64df91 | |||
9c44999682 | |||
4ef795d02e | |||
be04450c81 | |||
8b75d26eb8 | |||
69411beca5 | |||
7c921cf76b | |||
c0e00b7b08 | |||
e683b138b3 |
444 changed files with 16479 additions and 2109 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
.*.swp
|
||||
__pycache__
|
||||
files/ssh/backup.pub
|
||||
|
|
16
container-ports.md
Normal file
16
container-ports.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
# Ports used by container web services
|
||||
|
||||
| Port | Ansible role | Service name |
|
||||
|------|---------------------|----------------------------|
|
||||
| 8001 | kerberos_kdc | Kerberos KDC |
|
||||
| 8002 | grafana | Grafana |
|
||||
| 8003 | authcheck | Authentication check |
|
||||
| 8004 | roundcube | Roundcube webmail |
|
||||
| 8005 | php4dvd | php4dvd movie catalog |
|
||||
| 8006 | scanservjs | SANE Scanner webui |
|
||||
| 8007 | frigate | Network video recorder |
|
||||
| 8008 | hoemeassistant | Home Assistant |
|
||||
| 8009 | rocketchat | Rocket.Chat |
|
||||
| 8010 | google-spell-pspell | Google Spell Check XML API |
|
||||
| 8011 | ipsilon | Ipsilon Identity Provider |
|
||||
| 8012 | nodered | Node Red |
|
|
@ -1 +0,0 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKdaNO9dLpI8CVx1rwGsKN45Pgiz+Btrlf2Q/nXCx4Ru root@backup02.home.foo.sh
|
|
@ -1,8 +1,12 @@
|
|||
---
|
||||
datadisks:
|
||||
- {size: 10}
|
||||
- {size: 10, type: nvme}
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 80, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
||||
sssd_allow_groups:
|
||||
- sysadm
|
||||
|
|
|
@ -31,8 +31,10 @@ boot_url: https://boot.foo.sh
|
|||
# ssh public keys for logsync user
|
||||
logsync_publickeys: "{{ lookup('file', '../files/ssh/logsync.pub') }}"
|
||||
|
||||
# ssh public keys for backup user
|
||||
backup_publickeys: "{{ lookup('file', '../files/ssh/backup.pub') }}"
|
||||
# default name servers
|
||||
network_dns_servers:
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
|
||||
# hardcode this for now
|
||||
ansible_datacenter: home
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
datadisks:
|
||||
- {size: 10, type: hdd}
|
||||
- {size: 50, type: hdd}
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
|
|
@ -5,4 +5,4 @@ datadisks:
|
|||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
|
|
@ -12,12 +12,32 @@ network_vip_interfaces:
|
|||
netmask: 255.255.252.0
|
||||
pass: "{{ vip10_pass }}"
|
||||
priority: 120
|
||||
- device: vio0
|
||||
vhid: 11
|
||||
ipaddr: 172.20.20.11
|
||||
netmask: 255.255.252.0
|
||||
pass: "{{ vip11_pass }}"
|
||||
priority: "{{ vip11_priority }}"
|
||||
- device: vio0
|
||||
vhid: 12
|
||||
ipaddr: 172.20.20.12
|
||||
netmask: 255.255.252.0
|
||||
pass: "{{ vip12_pass }}"
|
||||
priority: "{{ vip12_priority }}"
|
||||
network_ether_interfaces:
|
||||
- device: vio1
|
||||
proto: none
|
||||
|
||||
unbound_zones:
|
||||
- 20.172.in-addr.arpa
|
||||
- home.foo.sh
|
||||
|
||||
# use custom firewall config
|
||||
firewall_src: pf.conf.gw_home
|
||||
|
||||
# ifstated config
|
||||
ifstated_config: ifstated-dna.conf.j2
|
||||
|
||||
# ssh host alaises
|
||||
ssh_hostnames:
|
||||
- gw.home.foo.sh
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
# default resources for new vm
|
||||
dsk_size: 20
|
||||
mem_size: 2048
|
||||
mem_size: 4096
|
||||
num_cpus: 2
|
||||
|
||||
# extra args for virt-install
|
||||
|
@ -18,7 +18,7 @@ ipcmd: >-
|
|||
{% endif %}
|
||||
virt_install_os_args: >-
|
||||
--location
|
||||
https://nic.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/38/Everything/x86_64/os/
|
||||
https://nic.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/41/Everything/x86_64/os/
|
||||
--extra-args
|
||||
"inst.ks={{ ks_file }}
|
||||
console=ttyS0
|
||||
|
|
8
group_vars/forgejo.yml
Normal file
8
group_vars/forgejo.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
datadisks:
|
||||
- {size: 10, type: nvme}
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
mem_size: 4096
|
||||
mem_size: 8192
|
||||
num_cpus: 2
|
||||
datadisks:
|
||||
- {size: 500}
|
||||
- {size: 50, type: nvme}
|
||||
- {size: 500, type: hdd}
|
||||
|
||||
network_vip_interfaces:
|
||||
- device: eth1
|
||||
|
@ -11,13 +12,16 @@ network_vip_interfaces:
|
|||
netmask: 255.255.0.0
|
||||
pass: "{{ vip26_pass }}"
|
||||
|
||||
zm_mysql_host: sqldb02.home.foo.sh
|
||||
unbound_zones:
|
||||
- 26.20.172.in-addr.arpa
|
||||
- cam.foo.sh
|
||||
dhcpd_template: dhcpd.conf.cam.j2
|
||||
dhcpd_ldap_filter: >-
|
||||
(&(objectClass=ieee802Device)(objectClass=ipHost)(cn=*.cam.foo.sh))
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
firewall_raw:
|
||||
- "-A INPUT -i eth1 -d 224.0.0.0/8 -j ACCEPT"
|
||||
- "-A INPUT -i eth1 -p vrrp -j ACCEPT"
|
||||
- "ip daddr 224.0.0.0/8 accept"
|
|
@ -4,8 +4,9 @@ network_vip_interfaces:
|
|||
vhid: 145
|
||||
ipaddr: 37.16.96.145
|
||||
netmask: 255.255.255.240
|
||||
ip6addr: 2a00:4cc1:6:1006::1
|
||||
ip6netmask: 64
|
||||
pass: "{{ vip145_pass }}"
|
||||
network_dns_servers: [172.20.20.10, 172.20.21.1, 172.20.21.2]
|
||||
|
||||
# use custom firewall and ifstated config
|
||||
firewall_src: pf.conf.gw_fsol
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
5
group_vars/home.yml
Normal file
5
group_vars/home.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
network_dns_servers:
|
||||
- 172.20.20.10
|
||||
- 172.20.20.11
|
||||
- 172.20.20.12
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
datadisks:
|
||||
- {size: 10, type: hdd}
|
||||
- {size: 10, type: nvme}
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
|
|
@ -5,4 +5,4 @@ datadisks:
|
|||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
|
|
@ -3,6 +3,5 @@ saslauthd_mech: ldap
|
|||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 636, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
---
|
||||
mem_size: 512
|
||||
datadisks:
|
||||
- {size: 50}
|
||||
- {size: 50, type: nvme}
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 6514}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
datadisks:
|
||||
- {size: 10}
|
||||
- {size: 10, type: nvme}
|
||||
mem_size: 4192
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
|
@ -10,4 +11,7 @@ firewall_in:
|
|||
- {proto: tcp, port: 465}
|
||||
- {proto: tcp, port: 587}
|
||||
- {proto: tcp, port: 993}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
||||
sssd_allow_groups:
|
||||
- sysadm
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
---
|
||||
mem_size: 4096
|
||||
datadisks:
|
||||
- {size: 100}
|
||||
- {size: 100, type: nvme}
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.30.0/24]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.30.0/24]}
|
||||
- {proto: tcp, port: 25565, from: [172.20.30.0/24]}
|
||||
- {proto: udp, port: 25565, from: [172.20.30.0/24]}
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
---
|
||||
|
||||
datadisks:
|
||||
- {size: 1000}
|
||||
- {size: 1500, type: hdd}
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 873, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
|
|
@ -4,3 +4,4 @@ datadisks:
|
|||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 27017, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
|
|
@ -3,5 +3,5 @@ firewall_in:
|
|||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.27.0/24]}
|
||||
- {proto: tcp, port: 1883, from: [172.20.27.0/24]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 8883, from: [172.20.20.0/22, 172.20.27.0/24]}
|
||||
|
|
|
@ -2,11 +2,14 @@
|
|||
mem_size: 8192
|
||||
num_cpus: 2
|
||||
datadisks:
|
||||
- {size: 1000}
|
||||
- {size: 400, type: nvme}
|
||||
- {size: 500, type: nvme}
|
||||
- {size: 50, type: nvme}
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 2049, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 2049, from: [172.20.30.0/24]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
||||
sssd_allow_groups:
|
||||
- root
|
||||
|
|
|
@ -1,12 +1,24 @@
|
|||
---
|
||||
datadisks:
|
||||
- {size: 10}
|
||||
- {size: 10, type: nvme}
|
||||
|
||||
unbound_zones:
|
||||
- 25.20.172.in-addr.arpa
|
||||
- oob.foo.sh
|
||||
dhcpd_template: dhcpd.conf.oob.j2
|
||||
dhcpd_ldap_filter: >-
|
||||
(&(objectClass=ieee802Device)(objectClass=ipHost)(cn=*.oob.foo.sh))
|
||||
|
||||
network_vip_interfaces:
|
||||
- device: eth0
|
||||
vhid: 11
|
||||
ipaddr: 172.20.20.21
|
||||
netmask: 255.255.240.0
|
||||
pass: "{{ vip21_pass }}"
|
||||
- device: eth1
|
||||
vhid: 25
|
||||
ipaddr: 172.20.25.1
|
||||
netmask: 255.255.0.0
|
||||
netmask: 255.255.255.0
|
||||
pass: "{{ vip25_pass }}"
|
||||
priority: "{{ vip25_priority }}"
|
||||
|
||||
|
@ -19,7 +31,10 @@ firewall_in:
|
|||
- {proto: udp, port: 123, from: [172.20.25.0/24]}
|
||||
- {proto: tcp, port: 443, from: [172.20.25.0/24]}
|
||||
- {proto: udp, port: 514, from: [172.20.25.0/24]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9116, from: [172.20.20.0/22]}
|
||||
firewall_raw:
|
||||
- "-A INPUT -i eth1 -d 224.0.0.0/8 -j ACCEPT"
|
||||
- "-A INPUT -i eth1 -p vrrp -j ACCEPT"
|
||||
- "ip daddr 224.0.0.0/8 accept"
|
||||
|
||||
sssd_allow_groups:
|
||||
- sysadm
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
---
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22, 81.175.130.44/32]}
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22, 212.149.225.204/32]}
|
||||
- {proto: tcp, port: 53}
|
||||
- {proto: udp, port: 53}
|
||||
- {proto: tcp, port: 80}
|
||||
- {proto: tcp, port: 443}
|
||||
- {proto: tcp, port: 853}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22, 81.175.130.44/32]}
|
||||
- {proto: tcp, port: 9100}
|
||||
- {proto: tcp, port: 9115}
|
||||
firewall_raw:
|
||||
- pass quick proto carp
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
---
|
||||
# increase memory size
|
||||
mem_size: 4192
|
||||
mem_size: 8192
|
||||
# increase disk size to store docker images
|
||||
dsk_size: 100
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
|
|
@ -17,5 +17,5 @@ num_cpus: 2
|
|||
|
||||
# extra args for virt-install
|
||||
virt_install_os_args: --cdrom {{ boot_url }}/openbsd/openbsd.iso
|
||||
virt_install_os_variant: openbsd7.0
|
||||
virt_install_python_cmd: pkg_add python3 -I -x
|
||||
virt_install_os_variant: openbsd7.4
|
||||
virt_install_python_cmd: pkg_add -I -x python
|
||||
|
|
|
@ -7,14 +7,20 @@ network_vip_interfaces:
|
|||
pass: "{{ vip24_pass }}"
|
||||
priority: "{{ vip24_priority }}"
|
||||
|
||||
dhcpd_template: dhcpd.conf.print.j2
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 53, from: [172.20.24.0/24]}
|
||||
- {proto: udp, port: 53, from: [172.20.24.0/24]}
|
||||
- {proto: tcp, port: 631, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
firewall_raw:
|
||||
- "-A INPUT -i eth1 -d 224.0.0.0/8 -j ACCEPT"
|
||||
- "-A INPUT -i eth1 -p vrrp -j ACCEPT"
|
||||
- "ip daddr 224.0.0.0/8 accept"
|
||||
|
||||
dhcpd_template: dhcpd.conf.print.j2
|
||||
dhcpd_ldap_filter: >-
|
||||
(&(objectClass=ieee802Device)(objectClass=ipHost)(cn=*.print.foo.sh))
|
||||
sssd_allow_groups:
|
||||
- sysadm
|
||||
unbound_zones:
|
||||
- 24.20.172.in-addr.arpa
|
||||
- print.foo.sh
|
||||
|
|
8
group_vars/prometheus.yml
Normal file
8
group_vars/prometheus.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
datadisks:
|
||||
- {size: 100, type: nvme}
|
||||
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
|
@ -4,12 +4,6 @@ mem_size: 1024
|
|||
# use bigger disk for os as we have web site data there
|
||||
dsk_size: 30
|
||||
|
||||
network_dns_servers:
|
||||
- 172.20.20.10
|
||||
- 172.20.21.7
|
||||
- 172.20.21.8
|
||||
network_dns_search:
|
||||
- foo.sh
|
||||
network_default_gateway: 37.16.96.145
|
||||
|
||||
network_vip_interfaces:
|
||||
|
@ -48,6 +42,4 @@ firewall_in:
|
|||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 80}
|
||||
- {proto: tcp, port: 443}
|
||||
- {proto: tcp, port: 636}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 6514}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
---
|
||||
network_dns_servers:
|
||||
- 172.20.20.10
|
||||
- 172.20.21.7
|
||||
- 172.20.21.8
|
||||
network_dns_search:
|
||||
- foo.sh
|
||||
network_default_gateway: 37.16.96.145
|
||||
|
||||
network_vip_interfaces:
|
||||
|
@ -41,3 +35,4 @@ firewall_in:
|
|||
- {proto: tcp, port: 443}
|
||||
- {proto: tcp, port: 636}
|
||||
- {proto: tcp, port: 6514}
|
||||
- {proto: tcp, port: 9100}
|
||||
|
|
5
group_vars/sane.yml
Normal file
5
group_vars/sane.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
|
@ -1,6 +1,4 @@
|
|||
---
|
||||
|
||||
# beef up shell hosts
|
||||
dsk_size: 40
|
||||
mem_size: 8192
|
||||
num_cpus: 4
|
||||
|
@ -9,4 +7,10 @@ firewall_in:
|
|||
- {proto: tcp, port: 22}
|
||||
- {proto: tcp, port: 80}
|
||||
- {proto: tcp, port: 443}
|
||||
- {proto: tcp, port: 4949, from: [81.175.130.44/32]}
|
||||
- {proto: tcp, port: 9100, from: [212.149.248.65/32]}
|
||||
|
||||
ssh_hostnames:
|
||||
- shell.foo.sh
|
||||
|
||||
sssd_allow_groups:
|
||||
- foosh
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
---
|
||||
mem_size: 4096
|
||||
datadisks:
|
||||
- {size: 20, type: nvme}
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 3306, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
|
|
@ -2,4 +2,7 @@
|
|||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 443, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
||||
sssd_allow_groups:
|
||||
- root
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
---
|
||||
firewall_in:
|
||||
- {proto: tcp, port: 22, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 4949, from: [172.20.20.0/22]}
|
||||
- {proto: tcp, port: 9100, from: [172.20.20.0/22]}
|
||||
|
|
6
host_vars/audiobooks02.home.foo.sh.yml
Normal file
6
host_vars/audiobooks02.home.foo.sh.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
vmhost: vmhost02.home.foo.sh
|
||||
network_interfaces:
|
||||
- device: eth0
|
||||
vlan: 20
|
||||
mac: "52:54:00:ac:dc:48"
|
|
@ -6,5 +6,5 @@ network_interfaces:
|
|||
mac: 52:54:00:ac:dc:50
|
||||
datadisks:
|
||||
- {size: 1000}
|
||||
passthrough_devices:
|
||||
- "07:04.0"
|
||||
virt_install_devices:
|
||||
- "02:04.0"
|
||||
|
|
|
@ -10,3 +10,5 @@ network_interfaces:
|
|||
- device: vio1
|
||||
vlan: 103
|
||||
proto: none
|
||||
vip11_priority: 240
|
||||
vip12_priority: 120
|
||||
|
|
|
@ -10,3 +10,5 @@ network_interfaces:
|
|||
- device: vio1
|
||||
vlan: 103
|
||||
proto: none
|
||||
vip11_priority: 120
|
||||
vip12_priority: 240
|
||||
|
|
|
@ -3,4 +3,4 @@ vmhost: vmhost02.home.foo.sh
|
|||
network_interfaces:
|
||||
- device: eth0
|
||||
vlan: 20
|
||||
mac: 52:54:00:ac:dc:7c
|
||||
mac: 52:54:00:ac:dc:80
|
|
@ -3,7 +3,7 @@ vmhost: vmhost02.home.foo.sh
|
|||
network_interfaces:
|
||||
- device: eth0
|
||||
vlan: 20
|
||||
mac: "52:54:00:ac:dc:4c"
|
||||
mac: "52:54:00:ac:dc:8c"
|
||||
nameservers: []
|
||||
- device: eth1
|
||||
vlan: 26
|
||||
|
@ -11,3 +11,5 @@ network_interfaces:
|
|||
netmask: 255.255.255.0
|
||||
proto: static
|
||||
nameservers: [172.20.26.1, 172.20.26.3]
|
||||
virt_install_devices:
|
||||
- 004.002
|
|
@ -15,6 +15,7 @@ network_interfaces:
|
|||
- device: vio2
|
||||
vlan: 103
|
||||
proto: dhcp
|
||||
rdomain: 1
|
||||
- device: vio3
|
||||
vlan: 102
|
||||
proto: none
|
||||
|
|
|
@ -15,6 +15,7 @@ network_interfaces:
|
|||
- device: vio2
|
||||
vlan: 103
|
||||
proto: dhcp
|
||||
rdomain: 1
|
||||
- device: vio3
|
||||
vlan: 102
|
||||
proto: none
|
||||
|
|
|
@ -5,6 +5,10 @@ network_interfaces:
|
|||
vlan: 20
|
||||
mac: 52:54:00:ac:dc:73
|
||||
- device: eth1
|
||||
vlan: 27
|
||||
- device: eth2
|
||||
vlan: 30
|
||||
virt_install_devices:
|
||||
- 003.002
|
||||
- 0b05:190e
|
||||
- 10c4:ea60
|
||||
- /dev/ttyUSB0
|
||||
|
|
|
@ -5,6 +5,6 @@ network_interfaces:
|
|||
vlan: 20
|
||||
mac: 52:54:00:ac:dc:1f
|
||||
datadisks:
|
||||
- {size: 10}
|
||||
- {size: 10, type: nvme}
|
||||
|
||||
ldap_master: true
|
||||
|
|
|
@ -3,4 +3,4 @@ vmhost: vmhost02.home.foo.sh
|
|||
network_interfaces:
|
||||
- device: eth0
|
||||
vlan: 20
|
||||
mac: 52:54:00:ac:dc:78
|
||||
mac: 52:54:00:ac:dc:14
|
|
@ -17,4 +17,4 @@ network_interfaces:
|
|||
netmask: 255.255.255.248
|
||||
proto: static
|
||||
|
||||
vip25_priority: 0
|
||||
vip25_priority: 1
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
vmhost: vmhost01.home.foo.sh
|
||||
datadisks:
|
||||
- {size: 10, type: nvme}
|
||||
network_interfaces:
|
||||
- device: eth0
|
||||
vlan: 20
|
||||
|
|
|
@ -3,4 +3,4 @@ vmhost: vmhost01.home.foo.sh
|
|||
network_interfaces:
|
||||
- device: eth0
|
||||
vlan: 20
|
||||
mac: 52:54:00:ac:dc:13
|
||||
mac: "52:54:00:ac:dc:83"
|
8
host_vars/sane02.home.foo.sh.yml
Normal file
8
host_vars/sane02.home.foo.sh.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
vmhost: vmhost02.home.foo.sh
|
||||
network_interfaces:
|
||||
- device: eth0
|
||||
vlan: 20
|
||||
mac: "52:54:00:ac:dc:88"
|
||||
virt_install_devices:
|
||||
- 001.003
|
91
hosts.yml
91
hosts.yml
|
@ -3,6 +3,9 @@ adm:
|
|||
hosts:
|
||||
adm01.home.foo.sh:
|
||||
adm02.home.foo.sh:
|
||||
audiobooks:
|
||||
hosts:
|
||||
audiobooks02.home.foo.sh:
|
||||
backup:
|
||||
hosts:
|
||||
backup02.home.foo.sh:
|
||||
|
@ -13,25 +16,33 @@ dnagw:
|
|||
hosts:
|
||||
dna-gw01.home.foo.sh:
|
||||
dna-gw02.home.foo.sh:
|
||||
forgejo:
|
||||
hosts:
|
||||
forgejo02.home.foo.sh:
|
||||
vars:
|
||||
forgejo_version: "10.0.1"
|
||||
frigate:
|
||||
hosts:
|
||||
frigate02.home.foo.sh:
|
||||
vars:
|
||||
frigate_version: "0.15.0"
|
||||
fsolgw:
|
||||
hosts:
|
||||
fsol-gw01.home.foo.sh:
|
||||
fsol-gw02.home.foo.sh:
|
||||
gitea:
|
||||
hosts:
|
||||
gitea02.home.foo.sh:
|
||||
vars:
|
||||
gitea_version: "1.19.4"
|
||||
gitearunner:
|
||||
hosts:
|
||||
gitea-runner02.home.foo.sh:
|
||||
vars:
|
||||
gitea_runner_version: "0.2.3"
|
||||
homeassistant:
|
||||
hosts:
|
||||
homeassistant01.home.foo.sh:
|
||||
vars:
|
||||
homeassistant_version: "2023.7"
|
||||
homeassistant_version: "2025.3"
|
||||
homeassistant_integrations:
|
||||
- name: electrolux_status
|
||||
repo: https://github.com/albaintor/homeassistant_electrolux_status.git
|
||||
version: v2.0.9
|
||||
- name: espsomfy_rts
|
||||
repo: https://github.com/rstrouse/ESPSomfy-RTS-HA.git
|
||||
version: v2.4.7
|
||||
nodered_version: 4.0.9
|
||||
influxdb:
|
||||
hosts:
|
||||
influxdb01.home.foo.sh:
|
||||
|
@ -45,12 +56,14 @@ log:
|
|||
mail:
|
||||
hosts:
|
||||
mail02.home.foo.sh:
|
||||
vars:
|
||||
opendkim_selector: 20250101
|
||||
minecraft:
|
||||
hosts:
|
||||
minecraft01.home.foo.sh:
|
||||
mirror:
|
||||
hosts:
|
||||
mirror01.home.foo.sh:
|
||||
mirror02.home.foo.sh:
|
||||
mongodb:
|
||||
hosts:
|
||||
mongodb01.home.foo.sh:
|
||||
|
@ -64,6 +77,8 @@ nms:
|
|||
hosts:
|
||||
nms01.home.foo.sh:
|
||||
nms02.home.foo.sh:
|
||||
vars:
|
||||
snmp_exporter_version: "0.28.0"
|
||||
ns:
|
||||
hosts:
|
||||
ns01.home.foo.sh:
|
||||
|
@ -74,20 +89,34 @@ ocinode:
|
|||
oci-node01.home.foo.sh:
|
||||
oci-node02.home.foo.sh:
|
||||
vars:
|
||||
grafana_version: "10.0.2"
|
||||
rocketchat_version: "6.2.10"
|
||||
roundcube_version: "1.6.1"
|
||||
grafana_version: "11.4.2"
|
||||
rocketchat_version: "7.4.0"
|
||||
roundcube_version: "1.6.10"
|
||||
print:
|
||||
hosts:
|
||||
print01.home.foo.sh:
|
||||
prometheus:
|
||||
hosts:
|
||||
prometheus01.home.foo.sh:
|
||||
vars:
|
||||
mysqld_exporter_version: "0.17.2"
|
||||
nginx_exporter_version: "1.4.1"
|
||||
proxy:
|
||||
hosts:
|
||||
proxy01.home.foo.sh:
|
||||
proxy02.home.foo.sh:
|
||||
redis:
|
||||
hosts:
|
||||
redis01.home.foo.sh:
|
||||
relay:
|
||||
hosts:
|
||||
relay01.home.foo.sh:
|
||||
relay02.home.foo.sh:
|
||||
sane:
|
||||
hosts:
|
||||
sane02.home.foo.sh:
|
||||
vars:
|
||||
scanservjs_version: "v3.0.3"
|
||||
shell:
|
||||
hosts:
|
||||
shell01.foo.sh:
|
||||
|
@ -103,23 +132,15 @@ vmhost:
|
|||
hosts:
|
||||
vmhost01.home.foo.sh:
|
||||
vmhost02.home.foo.sh:
|
||||
zm:
|
||||
hosts:
|
||||
zm02.home.foo.sh:
|
||||
|
||||
sftpbackup:
|
||||
children:
|
||||
collab:
|
||||
ldap:
|
||||
mongodb:
|
||||
sqldb:
|
||||
|
||||
vultr:
|
||||
hosts:
|
||||
atl01.vultr.foo.sh:
|
||||
|
||||
fedora:
|
||||
children:
|
||||
gitearunner:
|
||||
openbsd:
|
||||
children:
|
||||
backup:
|
||||
|
@ -129,27 +150,31 @@ openbsd:
|
|||
mqtt:
|
||||
ns:
|
||||
proxy:
|
||||
redis:
|
||||
relay:
|
||||
rocky8:
|
||||
children:
|
||||
collab:
|
||||
rocky9:
|
||||
children:
|
||||
adm:
|
||||
audiobooks:
|
||||
forgejo:
|
||||
frigate:
|
||||
homeassistant:
|
||||
influxdb:
|
||||
ldap:
|
||||
mail:
|
||||
minecraft:
|
||||
mirror:
|
||||
mongodb:
|
||||
nas:
|
||||
nms:
|
||||
ocinode:
|
||||
print:
|
||||
prometheus:
|
||||
sane:
|
||||
shell:
|
||||
zm:
|
||||
rocky9:
|
||||
children:
|
||||
adm:
|
||||
gitea:
|
||||
influxdb:
|
||||
ldap:
|
||||
mirror:
|
||||
mongodb:
|
||||
sqldb:
|
||||
static:
|
||||
vmhost:
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
name: /export
|
||||
src: LABEL=/export
|
||||
fstype: xfs
|
||||
opts: noatime,noexec,nosuid,nodev
|
||||
opts: noatime,nosuid,nodev
|
||||
passno: "0"
|
||||
dump: "0"
|
||||
state: mounted
|
||||
|
@ -27,10 +27,15 @@
|
|||
- base
|
||||
- ansible_host
|
||||
- certbot
|
||||
- cups
|
||||
- sshca
|
||||
- ssh_known_hosts
|
||||
- role: keytab
|
||||
principals:
|
||||
keytab_principals:
|
||||
- "host/{{ inventory_hostname }}@{{ kerberos_realm }}"
|
||||
- nfs_client
|
||||
- role: autofs
|
||||
autofs_home: false
|
||||
- sssd
|
||||
- mkhomedir
|
||||
- rpm_build
|
||||
|
@ -42,15 +47,21 @@
|
|||
name: "{{ item }}"
|
||||
state: installed
|
||||
with_items:
|
||||
- emacs-nox # more editors
|
||||
- httpd-tools # htpasswd
|
||||
- knot-utils # kdig (dns over tls)
|
||||
- libvirt-client # kvm host client
|
||||
- make # generic building
|
||||
- mariadb # mariadb client tools
|
||||
- mosquitto # mqtt reading
|
||||
- nano # more editors
|
||||
- nmap # check for open ports
|
||||
- nsd # check dns zone files
|
||||
- podman # building containers
|
||||
- pylint # python linting
|
||||
- python3-flake8 # python linting
|
||||
- speedtest-cli # testing network speed
|
||||
- ShellCheck # shell script linting
|
||||
- virt-install # install kvm guests
|
||||
- wget # still in backbone for downloads
|
||||
- whois # read whois data
|
||||
|
@ -63,6 +74,67 @@
|
|||
Host shell??.foo.sh
|
||||
CheckHostIP no
|
||||
dest: /root/.ssh/config
|
||||
mode: 0600
|
||||
mode: "0600"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Clone dns repo
|
||||
ansible.builtin.git:
|
||||
dest: /export/dns
|
||||
repo: https://adm01.home.foo.sh/dns.git
|
||||
update: true
|
||||
version: master
|
||||
environment:
|
||||
GIT_SSL_CAINFO: "{{ tls_certs }}/ca.crt"
|
||||
GIT_SSL_CERT: "{{ tls_certs }}/{{ inventory_hostname }}.crt"
|
||||
GIT_SSL_KEY: "{{ tls_private }}/{{ inventory_hostname }}.key"
|
||||
when: 'inventory_hostname != "adm01.home.foo.sh"'
|
||||
- name: Link dns repo
|
||||
ansible.builtin.file:
|
||||
dest: /srv/dns
|
||||
src: /export/dns
|
||||
state: link
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
follow: false
|
||||
- name: Add cron job to sync dns repo
|
||||
ansible.builtin.cron:
|
||||
name: sync dns repository
|
||||
job: >-
|
||||
GIT_SSL_CAINFO="{{ tls_certs }}/ca.crt"
|
||||
GIT_SSL_CERT="{{ tls_certs }}/{{ inventory_hostname }}.crt"
|
||||
GIT_SSL_KEY="{{ tls_private }}/{{ inventory_hostname }}.key"
|
||||
git -C /srv/dns pull -q
|
||||
minute: "02"
|
||||
when: 'inventory_hostname != "adm01.home.foo.sh"'
|
||||
- name: Links dns repo to web
|
||||
ansible.builtin.file:
|
||||
dest: "/srv/web/{{ inventory_hostname }}/dns.git"
|
||||
src: /srv/dns/.git
|
||||
state: link
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Add mqtt-tail script
|
||||
ansible.builtin.copy:
|
||||
dest: /usr/local/bin/mqtt-tail
|
||||
content: |
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
if [ -n "${1:-}" ]; then
|
||||
topic="$1"
|
||||
shift
|
||||
else
|
||||
topic="#"
|
||||
fi
|
||||
if [ $# -ne 0 ]; then
|
||||
echo "Usage: $(basename "$0") [topic]" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
exec mosquitto_sub -h mqtt02.home.foo.sh -v -t "$topic" \
|
||||
--cafile "{{ tls_certs }}/ca.crt" \
|
||||
--cert "{{ tls_certs }}/{{ inventory_hostname }}.crt" \
|
||||
--key "{{ tls_private }}/{{ inventory_hostname }}.key" \
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
|
25
playbooks/audiobooks.yml
Normal file
25
playbooks/audiobooks.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
- name: Deploy KVM virtual machines
|
||||
ansible.builtin.import_playbook: include/deploy-kvm-guest.yml
|
||||
vars:
|
||||
myhosts: audiobooks
|
||||
|
||||
- name: Configure instance
|
||||
hosts: audiobooks
|
||||
user: root
|
||||
gather_facts: true
|
||||
|
||||
pre_tasks:
|
||||
- name: Mount /export
|
||||
ansible.posix.mount:
|
||||
name: /export
|
||||
src: LABEL=/export
|
||||
fstype: xfs
|
||||
opts: noatime,nosuid,nodev
|
||||
passno: "0"
|
||||
dump: "0"
|
||||
state: mounted
|
||||
|
||||
roles:
|
||||
- base
|
||||
- audiobookshelf
|
|
@ -15,7 +15,7 @@
|
|||
name: /export
|
||||
src: /dev/sd1a
|
||||
fstype: ffs
|
||||
opts: rw,softdep,noatime
|
||||
opts: rw,softdep,noatime,noexec,nosuid,nodev
|
||||
passno: "1"
|
||||
dump: "2"
|
||||
state: mounted
|
||||
|
@ -25,5 +25,10 @@
|
|||
|
||||
roles:
|
||||
- base
|
||||
- backup_server
|
||||
- sftpbackup
|
||||
- backup_base
|
||||
- backup_bitbucket
|
||||
- backup_github
|
||||
- role: rclone
|
||||
rclone_hostgroup: sftpbackup
|
||||
rclone_service: backup
|
||||
- rsync_backup
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
- collab
|
||||
- mod_auth_gssapi
|
||||
- role: keytab
|
||||
keytab: /etc/httpd/httpd.keytab
|
||||
principals: HTTP/collab.foo.sh@FOO.SH
|
||||
group: apache
|
||||
keytab_path: /etc/httpd/httpd.keytab
|
||||
keytab_principals: HTTP/collab.foo.sh@FOO.SH
|
||||
keytab_group: apache
|
||||
- ldap
|
||||
|
||||
tasks:
|
||||
|
@ -38,7 +38,7 @@
|
|||
ansible.builtin.copy:
|
||||
content: "RedirectMatch permanent \"^/$\" /collab/\n"
|
||||
dest: "/etc/httpd/conf.local.d/redirects.conf"
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart apache
|
||||
|
@ -61,7 +61,7 @@
|
|||
dest: /srv/wikis/collab/htdocs/.htaccess
|
||||
owner: collab
|
||||
group: collab
|
||||
mode: 0660
|
||||
mode: "0660"
|
||||
seuser: _default
|
||||
setype: _default
|
||||
|
||||
|
|
|
@ -14,29 +14,14 @@
|
|||
|
||||
roles:
|
||||
- base
|
||||
- ifstated
|
||||
- dhcpd
|
||||
- nginx/server
|
||||
- role: nginx/site
|
||||
site: gw.home.foo.sh
|
||||
- nginx
|
||||
- role: nginx_site
|
||||
nginx_site_name: gw.home.foo.sh
|
||||
- tftp
|
||||
- websockify
|
||||
|
||||
tasks:
|
||||
- name: Use configured dns servers and domain name
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/dhclient.conf
|
||||
content: "ignore domain-name-servers, domain-name;\n"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Disable resolvd
|
||||
ansible.builtin.service:
|
||||
name: resolvd
|
||||
state: stopped
|
||||
enabled: false
|
||||
|
||||
- name: Enable ip forwarding
|
||||
ansible.posix.sysctl:
|
||||
name: "{{ item }}"
|
||||
|
@ -49,11 +34,49 @@
|
|||
- name: Run handlers to get interfaces configured
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: Import ifstated role
|
||||
ansible.builtin.import_role:
|
||||
name: ifstated
|
||||
|
||||
- name: Copy DNS private key
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ tls_private }}/dns.home.foo.sh.key"
|
||||
src: "{{ item }}"
|
||||
mode: "0600"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
with_first_found:
|
||||
- /srv/letsencrypt/live/dns.home.foo.sh/privkey.pem
|
||||
- "/srv/ca/private/{{ inventory_hostname }}.key"
|
||||
tags: certificates
|
||||
notify: Restart unbound
|
||||
|
||||
- name: Copy DNS certificate and ca cert
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ tls_certs }}/dns.home.foo.sh.crt"
|
||||
src: "{{ item }}"
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
with_first_found:
|
||||
- /srv/letsencrypt/live/dns.home.foo.sh/fullchain.pem
|
||||
- "/srv/ca/certs/hosts/{{ inventory_hostname }}.crt"
|
||||
tags: certificates
|
||||
notify: Restart unbound
|
||||
|
||||
- name: Import unbound role
|
||||
ansible.builtin.import_role:
|
||||
name: unbound
|
||||
|
||||
- name: Import unbound_exporter role
|
||||
ansible.builtin.import_role:
|
||||
name: unbound_exporter
|
||||
|
||||
- name: Create tftp boot directories
|
||||
ansible.builtin.file:
|
||||
path: /srv/tftpboot/etc
|
||||
state: directory
|
||||
mode: 0755
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
|
@ -64,25 +87,25 @@
|
|||
stty com0 115200
|
||||
set tty com0
|
||||
boot tftp:bsd.rd
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Create tftp pxeboot loader for OpenBSD installs
|
||||
ansible.builtin.get_url:
|
||||
url: "https://ftp.eu.openbsd.org/pub/OpenBSD/7.3/amd64/pxeboot"
|
||||
checksum: sha1:161b36d4ae3d786aa98c4836abba25f2bca8979d
|
||||
url: "https://ftp.eu.openbsd.org/pub/OpenBSD/7.6/amd64/pxeboot"
|
||||
checksum: sha1:c696836c1e6cc67c6c31f6ceb5daaaa4ec0632b7
|
||||
dest: /srv/tftpboot/pxeboot
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Create tftp ramdisk for OpenBSD installs
|
||||
ansible.builtin.get_url:
|
||||
url: "https://ftp.eu.openbsd.org/pub/OpenBSD//7.3/amd64/bsd.rd"
|
||||
checksum: sha1:72b46ad8e97b2082d145a739264e818dcd154021
|
||||
url: "https://ftp.eu.openbsd.org/pub/OpenBSD/7.6/amd64/bsd.rd"
|
||||
checksum: sha1:f690655c768ec9ef208188921ac53634a9233aca
|
||||
dest: /srv/tftpboot/bsd.rd
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
|
@ -91,7 +114,7 @@
|
|||
url: "https://boot.foo.sh/openbsd/install.conf"
|
||||
checksum: sha1:f6270708dad3f759df02eefeab300d9b8670f3d4
|
||||
dest: /srv/tftpboot/install.conf
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
|
@ -113,50 +136,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart nginx
|
||||
|
||||
- name: Copy DNS private key
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ tls_private }}/dns.home.foo.sh.key"
|
||||
src: "{{ item }}"
|
||||
mode: 0600
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
with_first_found:
|
||||
- /srv/letsencrypt/live/dns.home.foo.sh/privkey.pem
|
||||
- "/srv/ca/private/{{ inventory_hostname }}.key"
|
||||
tags: certificates
|
||||
notify: Restart unbound
|
||||
|
||||
- name: Copy DNS certificate and ca cert
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ tls_certs }}/dns.home.foo.sh.crt"
|
||||
src: "{{ item }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
with_first_found:
|
||||
- /srv/letsencrypt/live/dns.home.foo.sh/fullchain.pem
|
||||
- "/srv/ca/certs/hosts/{{ inventory_hostname }}.crt"
|
||||
tags: certificates
|
||||
notify: Restart unbound
|
||||
|
||||
- name: Copy DNS zone files
|
||||
ansible.builtin.copy:
|
||||
dest: "/var/unbound/db/{{ item }}"
|
||||
src: "/srv/dns/{{ item }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
tags: dns
|
||||
notify: Restart unbound
|
||||
with_items:
|
||||
- 20.172.in-addr.arpa
|
||||
- home.foo.sh
|
||||
|
||||
- name: Import unbound role
|
||||
ansible.builtin.import_role:
|
||||
name: unbound
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
- name: Deploy KVM virtual machines
|
||||
ansible.builtin.import_playbook: include/deploy-kvm-guest.yml
|
||||
vars:
|
||||
myhosts: gitea
|
||||
myhosts: forgejo
|
||||
|
||||
- name: Configure instance
|
||||
hosts: gitea
|
||||
hosts: forgejo
|
||||
user: root
|
||||
gather_facts: true
|
||||
|
||||
|
@ -25,4 +25,4 @@
|
|||
|
||||
roles:
|
||||
- base
|
||||
- gitea
|
||||
- forgejo
|
|
@ -2,10 +2,10 @@
|
|||
- name: Deploy KVM virtual machines
|
||||
ansible.builtin.import_playbook: include/deploy-kvm-guest.yml
|
||||
vars:
|
||||
myhosts: zm
|
||||
myhosts: frigate
|
||||
|
||||
- name: Configure instance
|
||||
hosts: zm
|
||||
hosts: frigate
|
||||
user: root
|
||||
gather_facts: true
|
||||
|
||||
|
@ -13,74 +13,54 @@
|
|||
- "{{ ansible_private }}/vars.yml"
|
||||
|
||||
pre_tasks:
|
||||
- name: Mount /export
|
||||
- name: Mount datadirectories
|
||||
ansible.posix.mount:
|
||||
name: /export
|
||||
src: LABEL=/export
|
||||
name: "/export/frigate/{{ item }}"
|
||||
src: "LABEL={{ item }}"
|
||||
fstype: xfs
|
||||
opts: noatime,noexec,nosuid,nodev
|
||||
passno: "0"
|
||||
dump: "0"
|
||||
state: mounted
|
||||
with_items:
|
||||
- config
|
||||
- media
|
||||
|
||||
roles:
|
||||
- base
|
||||
- mod_auth_gssapi
|
||||
- role: keytab
|
||||
keytab: /etc/httpd/httpd.keytab
|
||||
principals: HTTP/zm.foo.sh@FOO.SH
|
||||
group: apache
|
||||
keytab_path: /etc/httpd/httpd.keytab
|
||||
keytab_principals: HTTP/cctv.foo.sh@FOO.SH
|
||||
keytab_group: apache
|
||||
|
||||
tasks:
|
||||
- name: Run handlers to get interfaces configured
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
# TODO: this should really be fixed
|
||||
- name: Put selinux in permissive state
|
||||
ansible.posix.selinux:
|
||||
policy: targeted
|
||||
state: permissive
|
||||
|
||||
- name: Copy DNS zone files
|
||||
ansible.builtin.copy:
|
||||
dest: "/var/lib/unbound/{{ item }}"
|
||||
src: "/srv/dns/{{ item }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
tags: dns
|
||||
notify: Restart unbound
|
||||
with_items:
|
||||
- 26.20.172.in-addr.arpa
|
||||
- cam.foo.sh
|
||||
|
||||
- name: Include unbound role
|
||||
ansible.builtin.import_role:
|
||||
name: unbound
|
||||
|
||||
- name: Include dhcpd and zoneminder roles
|
||||
- name: Run handlers to get interfaces configured
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
- name: Include dhcpd role
|
||||
ansible.builtin.include_role:
|
||||
name: "{{ item }}"
|
||||
with_items:
|
||||
- dhcpd
|
||||
- zoneminder
|
||||
name: dhcpd
|
||||
|
||||
- name: Install extra packages for debugging
|
||||
ansible.builtin.package:
|
||||
name: rtmpdump
|
||||
state: installed
|
||||
- name: Include frigate role
|
||||
ansible.builtin.include_role:
|
||||
name: frigate
|
||||
|
||||
- name: Require authentication for zoneminder
|
||||
- name: Require authentication for frigate
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/httpd/conf.local.d/zoneminder-auth.conf
|
||||
dest: /etc/httpd/conf.local.d/frigate-auth.conf
|
||||
content: |
|
||||
<Location /zm>
|
||||
<Location /frigate>
|
||||
AuthType GSSAPI
|
||||
GssapiBasicAuth Off
|
||||
GssapiBasicAuth On
|
||||
AuthName "Password Required"
|
||||
Require valid-user
|
||||
</Location>
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart apache
|
|
@ -12,13 +12,6 @@
|
|||
vars_files:
|
||||
- "{{ ansible_private }}/vars.yml"
|
||||
|
||||
pre_tasks:
|
||||
- name: Disable resolvd service
|
||||
ansible.builtin.service:
|
||||
name: resolvd
|
||||
state: stopped
|
||||
enabled: false
|
||||
|
||||
tasks:
|
||||
- name: Enable IP forwarding
|
||||
ansible.posix.sysctl:
|
||||
|
@ -30,16 +23,19 @@
|
|||
- net.inet6.ip6.forwarding
|
||||
- name: Manually set DNS servers
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/dhclient.conf
|
||||
content: "ignore domain-name-servers, domain-name;\n"
|
||||
mode: 0644
|
||||
dest: /etc/dhcpleased.conf
|
||||
content: |
|
||||
interface vio2 {
|
||||
ignore dns
|
||||
}
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
- name: Create pfsync interface
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/hostname.pfsync0
|
||||
content: "up syncdev vio1\n"
|
||||
mode: 0600
|
||||
mode: "0600"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
---
|
||||
- name: Deploy KVM virtual machines
|
||||
ansible.builtin.import_playbook: include/deploy-kvm-guest.yml
|
||||
vars:
|
||||
myhosts: gitearunner
|
||||
|
||||
- name: Configure instance
|
||||
hosts: gitearunner
|
||||
user: root
|
||||
gather_facts: true
|
||||
|
||||
roles:
|
||||
- base
|
||||
- gitea_runner
|
|
@ -9,6 +9,9 @@
|
|||
user: root
|
||||
gather_facts: true
|
||||
|
||||
vars_files:
|
||||
- "{{ ansible_private }}/vars.yml"
|
||||
|
||||
pre_tasks:
|
||||
- name: Mount /export
|
||||
ansible.posix.mount:
|
||||
|
@ -24,3 +27,4 @@
|
|||
- base
|
||||
- ldap
|
||||
- homeassistant
|
||||
- nodered
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
char: "{{ 'bcdefghijklmnopqrstuvwxyz'|list }}"
|
||||
console_log: "/var/log/libvirt/qemu/{{ inventory_hostname }}.console.log"
|
||||
os_disk_image: "/srv/libvirt/ssd/{{ inventory_hostname }}.a.img"
|
||||
os_disk_image: "/srv/libvirt/os/{{ inventory_hostname }}.a.img"
|
||||
dsk_opts: bus=virtio,cache=none,device=disk,format=raw,sparse=no
|
||||
|
||||
inject: >-
|
||||
|
@ -75,7 +75,7 @@
|
|||
echo '{{ root_pubkey }}' > /root/.ssh/authorized_keys
|
||||
%end
|
||||
dest: "{{ tmpdir.path }}/include.ks"
|
||||
mode: 0600
|
||||
mode: "0600"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
delegate_to: "{{ vmhost }}"
|
||||
|
@ -99,7 +99,11 @@
|
|||
{% endif -%}
|
||||
{% if virt_install_devices is defined -%}
|
||||
{% for dev in virt_install_devices -%}
|
||||
{% if dev | regex_search('^/dev/tty') -%}
|
||||
--serial dev,path={{ dev }}
|
||||
{% else -%}
|
||||
--hostdev {{ dev }} \
|
||||
{% endif -%}
|
||||
{% endfor -%}
|
||||
{% else -%}
|
||||
--controller usb,model=none \
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
passno: "0"
|
||||
dump: "0"
|
||||
state: mounted
|
||||
when: ldap_master is defined
|
||||
when: ldap_master
|
||||
|
||||
vars_files:
|
||||
- "{{ ansible_private }}/vars.yml"
|
||||
|
@ -28,8 +28,8 @@
|
|||
- base
|
||||
- ldap_server
|
||||
- role: kadmin
|
||||
when: ldap_master is defined
|
||||
when: ldap_master
|
||||
- role: ldap_netdb
|
||||
when: ldap_master is defined
|
||||
when: ldap_master
|
||||
- role: ldap_gravatar
|
||||
when: ldap_master is defined
|
||||
when: ldap_master
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
name: /export
|
||||
src: /dev/sd1a
|
||||
fstype: ffs
|
||||
opts: rw,softdep,noatime
|
||||
opts: rw,softdep,noatime,noexec,nosuid,nodev
|
||||
passno: "1"
|
||||
dump: "2"
|
||||
state: mounted
|
||||
|
|
|
@ -26,18 +26,19 @@
|
|||
roles:
|
||||
- base
|
||||
- role: keytab
|
||||
principals:
|
||||
keytab_principals:
|
||||
- "host/{{ inventory_hostname }}@{{ kerberos_realm }}"
|
||||
- "smtp/{{ mail_server }}@{{ kerberos_realm }}"
|
||||
- nfs_client
|
||||
- sssd
|
||||
- autofs
|
||||
- dovecot
|
||||
- role: nginx/server
|
||||
- role: nginx/site
|
||||
site: "{{ mail_server }}"
|
||||
redirect: https://webmail.foo.sh/
|
||||
- role: nginx
|
||||
- role: nginx_site
|
||||
nginx_site_name: "{{ mail_server }}"
|
||||
nginx_site_redirect: https://webmail.foo.sh/
|
||||
- grossd
|
||||
- opendkim
|
||||
- spamassassin
|
||||
- spamassassin_clamav
|
||||
- spamassassin_ixhash
|
||||
|
|
23
playbooks/manual/check-updates.yml
Normal file
23
playbooks/manual/check-updates.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
- hosts: all
|
||||
gather_facts: true
|
||||
tasks:
|
||||
- name: Check updates (Linux)
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- dnf
|
||||
- -q
|
||||
- check-update
|
||||
register: result
|
||||
changed_when: result.rc == 100
|
||||
failed_when: result.rc not in [0, 100]
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- name: Check updates (OpenBSD)
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- syspatch
|
||||
- -c
|
||||
register: result
|
||||
changed_when: result.stdout != ""
|
||||
when: ansible_os_family == "OpenBSD"
|
|
@ -15,7 +15,7 @@
|
|||
name: /export
|
||||
src: LABEL=/export
|
||||
fstype: xfs
|
||||
opts: noatime
|
||||
opts: noatime,noexec,nosuid,nodev
|
||||
passno: "0"
|
||||
dump: "0"
|
||||
state: mounted
|
||||
|
|
|
@ -26,26 +26,30 @@
|
|||
roles:
|
||||
- base
|
||||
- mirror/base
|
||||
- mirror/thinlinc
|
||||
- role: mirror/reportmirror
|
||||
hostname: mirrors.foo.sh
|
||||
mirrors: [epel, fedora]
|
||||
sitename: foo.sh
|
||||
password: "{{ report_mirror_pass }}"
|
||||
- thinlinc_mirror
|
||||
- role: reportmirror
|
||||
reportmirror_hostname: mirrors.foo.sh
|
||||
reportmirror_mirrors: [epel, fedora]
|
||||
reportmirror_sitename: foo.sh
|
||||
reportmirror_password: "{{ report_mirror_pass }}"
|
||||
- role: mirror/sync
|
||||
label: fedora-epel
|
||||
source: "rsync://rsync.nic.funet.fi/ftp/pub/mirrors/\
|
||||
fedora.redhat.com/pub/epel"
|
||||
rsyncoptions:
|
||||
- "--exclude=SRPMS"
|
||||
mirror_label: fedora-epel
|
||||
mirror_source:
|
||||
"rsync://rsync.nic.funet.fi/ftp/pub/mirrors/fedora.redhat.com/pub/epel"
|
||||
mirror_rsyncoptions:
|
||||
- "--exclude=debug"
|
||||
- "--exclude=testing"
|
||||
- "--exclude=aarch64"
|
||||
- "--exclude=ppc64le"
|
||||
- "--exclude=s390x"
|
||||
- "--exclude=source"
|
||||
- "--delete-excluded"
|
||||
postcmd: python3 /usr/local/bin/report_mirror
|
||||
mirror_postcmd: python3 /usr/local/bin/report_mirror
|
||||
- role: mirror/sync
|
||||
label: fedora
|
||||
source: "rsync://rsync.nic.funet.fi/ftp/pub/mirrors/\
|
||||
fedora.redhat.com/pub/fedora/linux/"
|
||||
rsyncoptions:
|
||||
mirror_label: fedora
|
||||
mirror_source:
|
||||
"rsync://rsync.nic.funet.fi/ftp/pub/mirrors/fedora.redhat.com/pub/fedora/linux/"
|
||||
mirror_rsyncoptions:
|
||||
- "--exclude=/atomic"
|
||||
- "--exclude=/development"
|
||||
- "--exclude=/releases/test"
|
||||
|
@ -58,12 +62,11 @@
|
|||
- "--exclude=armhfp"
|
||||
- "--exclude=debug"
|
||||
- "--delete-excluded"
|
||||
postcmd: python3 /usr/local/bin/report_mirror
|
||||
mirror_postcmd: python3 /usr/local/bin/report_mirror
|
||||
- role: mirror/sync
|
||||
label: openbsd
|
||||
source: "rsync://rsync.nic.funet.fi/ftp/pub/mirrors/\
|
||||
ftp.openbsd.org/pub/OpenBSD/"
|
||||
rsyncoptions:
|
||||
mirror_label: openbsd
|
||||
mirror_source: "rsync://ftp.nluug.nl/openbsd/"
|
||||
mirror_rsyncoptions:
|
||||
- "--include=/?.?/"
|
||||
- "--include=/?.?/amd64/"
|
||||
- "--include=/?.?/amd64/*"
|
||||
|
|
|
@ -9,10 +9,15 @@
|
|||
user: root
|
||||
gather_facts: true
|
||||
|
||||
vars_files:
|
||||
- "{{ ansible_private }}/vars.yml"
|
||||
|
||||
roles:
|
||||
- base
|
||||
- mosquitto
|
||||
- ha_mqtt_configd
|
||||
- telegraf
|
||||
- nginx/server
|
||||
- role: nginx/site
|
||||
site: iot.foo.sh
|
||||
- nginx
|
||||
- role: nginx_site
|
||||
nginx_site_name: iot.foo.sh
|
||||
- shelly_firmware
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
name: /export/home
|
||||
src: LABEL=home
|
||||
fstype: xfs
|
||||
opts: noatime
|
||||
opts: noatime,nodev
|
||||
passno: "0"
|
||||
dump: "0"
|
||||
state: mounted
|
||||
|
@ -27,7 +27,7 @@
|
|||
name: /export/roles
|
||||
src: LABEL=roles
|
||||
fstype: xfs
|
||||
opts: noatime
|
||||
opts: noatime,nodev
|
||||
passno: "0"
|
||||
dump: "0"
|
||||
state: mounted
|
||||
|
@ -38,20 +38,4 @@
|
|||
- sssd
|
||||
- nfs_server
|
||||
- role: keytab
|
||||
principals: "nfs/{{ inventory_hostname }}@FOO.SH"
|
||||
|
||||
tasks:
|
||||
- name: Copy exports file
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/exports
|
||||
content: |
|
||||
/export/home 172.20.30.0/24(rw,root_squash,secure,sec=krb5p) \
|
||||
@nfsclients-rw(rw,root_squash,secure) \
|
||||
@nfsclients-ro(ro,root_squash,secure)
|
||||
/export/roles 172.20.30.0/24(rw,root_squash,secure,sec=krb5p) \
|
||||
@nfsclients-rw(rw,root_squash,secure) \
|
||||
@nfsclients-ro(ro,root_squash,secure)
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart nfs-server
|
||||
keytab_principals: "nfs/{{ inventory_hostname }}@FOO.SH"
|
||||
|
|
|
@ -25,12 +25,22 @@
|
|||
|
||||
roles:
|
||||
- base
|
||||
- nginx/server
|
||||
- role: nginx/site
|
||||
site: oob.foo.sh
|
||||
- cups
|
||||
- nginx
|
||||
- role: nginx_site
|
||||
nginx_site_name: oob.foo.sh
|
||||
nginx_site_plaintext: false
|
||||
- role: keytab
|
||||
keytab_principals:
|
||||
- "host/{{ inventory_hostname }}@{{ kerberos_realm }}"
|
||||
- nfs_client
|
||||
- role: autofs
|
||||
autofs_home: false
|
||||
- sssd
|
||||
- mkhomedir
|
||||
- tftp
|
||||
- aten_pdu
|
||||
- routeros
|
||||
- snmp_exporter
|
||||
|
||||
tasks:
|
||||
- name: Enable UDP rsyslog server
|
||||
|
@ -45,23 +55,14 @@
|
|||
vars:
|
||||
relay_domains: [foo.sh]
|
||||
|
||||
- name: Copy DNS zone files
|
||||
ansible.builtin.copy:
|
||||
dest: "/var/lib/unbound/{{ item }}"
|
||||
src: "/srv/dns/{{ item }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
tags: dns
|
||||
notify: Restart unbound
|
||||
with_items:
|
||||
- 25.20.172.in-addr.arpa
|
||||
- oob.foo.sh
|
||||
|
||||
- name: Import unbound role
|
||||
ansible.builtin.import_role:
|
||||
name: unbound
|
||||
|
||||
- name: Import dhcpd role
|
||||
ansible.builtin.import_role:
|
||||
name: dhcpd
|
||||
|
||||
# convert this to role for restart support
|
||||
- name: Enable NTP server for oob network
|
||||
ansible.builtin.lineinfile:
|
||||
|
@ -74,10 +75,18 @@
|
|||
name: "{{ item }}"
|
||||
state: installed
|
||||
with_items:
|
||||
- net-snmp-utils
|
||||
- nmap
|
||||
- rcs
|
||||
- scanssh
|
||||
- sslscan
|
||||
- unzip
|
||||
- wget
|
||||
|
||||
- name: Create sw-backup script
|
||||
ansible.builtin.copy:
|
||||
dest: /usr/local/bin/sw-backup
|
||||
content: |
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
ssh "admin@${1}" /export > "/srv/backup/${1}.rsc"
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
- name: Deploy KVM virtual machines
|
||||
ansible.builtin.import_playbook: include/deploy-kvm-guest.yml
|
||||
vars:
|
||||
myhosts: ns:!vultr
|
||||
myhosts: ns:!atl01.vultr.foo.sh
|
||||
|
||||
- name: Configure instance
|
||||
hosts: ns
|
||||
|
@ -15,9 +15,11 @@
|
|||
roles:
|
||||
- base
|
||||
- nsd
|
||||
- role: nginx/server
|
||||
- role: nginx/site
|
||||
site: "{{ nsd_server }}"
|
||||
redirect: https://www.foo.sh/
|
||||
- role: nginx
|
||||
- role: nginx_site
|
||||
nginx_site_name: "{{ nsd_server }}"
|
||||
nginx_site_redirect: https://www.foo.sh/
|
||||
- role: ifstated
|
||||
when: "'vultr' not in group_names"
|
||||
- role: blackbox_exporter
|
||||
when: "inventory_hostname == 'atl01.vultr.foo.sh'"
|
||||
|
|
|
@ -12,9 +12,25 @@
|
|||
vars_files:
|
||||
- "{{ ansible_private }}/vars.yml"
|
||||
|
||||
pre_tasks:
|
||||
- name: Mount /export
|
||||
ansible.posix.mount:
|
||||
name: /export
|
||||
src: LABEL=/export
|
||||
fstype: xfs
|
||||
opts: noatime,noexec,nosuid,nodev
|
||||
passno: "0"
|
||||
dump: "0"
|
||||
state: mounted
|
||||
when: ansible_fqdn == 'oci-node01.home.foo.sh'
|
||||
|
||||
roles:
|
||||
- base
|
||||
- authcheck
|
||||
- grafana
|
||||
- ipsilon
|
||||
- kdc
|
||||
- roundcube
|
||||
- role: php4dvd
|
||||
when: ansible_fqdn == 'oci-node01.home.foo.sh'
|
||||
- rocketchat
|
||||
|
|
|
@ -14,10 +14,17 @@
|
|||
|
||||
roles:
|
||||
- base
|
||||
- role: keytab
|
||||
keytab_principals:
|
||||
- "host/{{ inventory_hostname }}@{{ kerberos_realm }}"
|
||||
- sssd
|
||||
- mkhomedir
|
||||
|
||||
tasks:
|
||||
- name: Install unbound role
|
||||
ansible.builtin.import_role:
|
||||
name: unbound
|
||||
|
||||
- name: Run handlers to get interfaces configured
|
||||
ansible.builtin.meta: flush_handlers
|
||||
|
||||
|
@ -25,30 +32,20 @@
|
|||
ansible.builtin.import_role:
|
||||
name: dhcpd
|
||||
|
||||
- name: Copy DNS zone files
|
||||
ansible.builtin.copy:
|
||||
dest: "/var/lib/unbound/{{ item }}"
|
||||
src: "/srv/dns/{{ item }}"
|
||||
mode: 0644
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
tags: dns
|
||||
notify: restart unbound
|
||||
with_items:
|
||||
- 24.20.172.in-addr.arpa
|
||||
- print.foo.sh
|
||||
|
||||
- name: Install unbound role
|
||||
ansible.builtin.import_role:
|
||||
name: unbound
|
||||
|
||||
- name: Install cups_server role
|
||||
ansible.builtin.import_role:
|
||||
name: cups_server
|
||||
|
||||
- name: Install keytab for CUPS
|
||||
ansible.builtin.import_role:
|
||||
ansible.builtin.include_role:
|
||||
name: keytab
|
||||
vars:
|
||||
keytab: /etc/cups/cups.keytab
|
||||
principals: "HTTP/print.foo.sh@{{ kerberos_realm }}"
|
||||
keytab_path: /etc/cups/cups.keytab
|
||||
keytab_principals: "HTTP/print.foo.sh@{{ kerberos_realm }}"
|
||||
|
||||
- name: Enable postfix mail relay
|
||||
ansible.builtin.import_role:
|
||||
name: postfix
|
||||
tasks_from: relay
|
||||
vars:
|
||||
relay_domains: [foo.sh]
|
||||
|
|
30
playbooks/prometheus.yml
Normal file
30
playbooks/prometheus.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
- name: Deploy KVM virtual machines
|
||||
ansible.builtin.import_playbook: include/deploy-kvm-guest.yml
|
||||
vars:
|
||||
myhosts: prometheus
|
||||
|
||||
- name: Configure instance
|
||||
hosts: prometheus
|
||||
user: root
|
||||
gather_facts: true
|
||||
|
||||
vars_files:
|
||||
- "{{ ansible_private }}/vars.yml"
|
||||
|
||||
pre_tasks:
|
||||
- name: Mount /export
|
||||
ansible.posix.mount:
|
||||
name: /export
|
||||
src: LABEL=/export
|
||||
fstype: xfs
|
||||
opts: noatime,noexec,nosuid,nodev
|
||||
passno: "0"
|
||||
dump: "0"
|
||||
state: mounted
|
||||
|
||||
roles:
|
||||
- base
|
||||
- prometheus
|
||||
- mysqld_exporter
|
||||
- nginx_exporter
|
|
@ -15,90 +15,116 @@
|
|||
roles:
|
||||
- base
|
||||
- ifstated
|
||||
- nginx/server
|
||||
- role: nginx/site
|
||||
site: ca.foo.sh
|
||||
- role: nginx/site
|
||||
site: foo.monster
|
||||
- role: nginx/site
|
||||
site: tuiradc.fi
|
||||
redirect: https://facebook.com/TuiraDC
|
||||
- role: nginx/site
|
||||
site: www.tuiradc.fi
|
||||
redirect: https://facebook.com/TuiraDC
|
||||
- role: nginx/site
|
||||
site: foo.sh
|
||||
redirect: https://www.foo.sh/
|
||||
- role: nginx/site
|
||||
site: autoconfig.foo.sh
|
||||
- role: nginx/site
|
||||
site: boot.foo.sh
|
||||
ssl_config: old
|
||||
- role: nginx/site
|
||||
site: bitbucket.foo.sh
|
||||
redirect: https://bitbucket.org/tmakinen/
|
||||
- role: nginx/site
|
||||
site: certbot.home.foo.sh
|
||||
proxy: https://certbot.home.foo.sh/
|
||||
- role: nginx/site
|
||||
site: chat.foo.sh
|
||||
proxy:
|
||||
- https://oci-node01.home.foo.sh/rocketchat/
|
||||
- https://oci-node02.home.foo.sh/rocketchat/
|
||||
- role: nginx/site
|
||||
site: collab.foo.sh
|
||||
proxy: https://collab01.home.foo.sh/
|
||||
- role: nginx/site
|
||||
site: devel01.foo.sh
|
||||
proxy: https://devel01.home.foo.sh/
|
||||
- role: nginx/site
|
||||
site: dns.home.foo.sh
|
||||
redirect: https://www.foo.sh/
|
||||
- role: nginx/site
|
||||
site: git.foo.sh
|
||||
proxy: https://gitea02.home.foo.sh/
|
||||
- role: nginx/site
|
||||
site: gitea.foo.sh
|
||||
redirect: https://git.foo.sh/
|
||||
- role: nginx/site
|
||||
site: ha.foo.sh
|
||||
proxy: https://homeassistant01.home.foo.sh/
|
||||
- role: nginx/site
|
||||
site: id.foo.sh
|
||||
proxy:
|
||||
- nginx
|
||||
- nginx_logsync
|
||||
- role: nginx_site
|
||||
nginx_site_name: ca.foo.sh
|
||||
- role: nginx_site
|
||||
nginx_site_name: foo.monster
|
||||
- role: nginx_site
|
||||
nginx_site_name: tuiradc.fi
|
||||
nginx_site_redirect: https://facebook.com/TuiraDC
|
||||
- role: nginx_site
|
||||
nginx_site_name: www.tuiradc.fi
|
||||
nginx_site_redirect: https://facebook.com/TuiraDC
|
||||
- role: nginx_site
|
||||
nginx_site_name: foo.sh
|
||||
nginx_site_redirect: https://www.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: apps.foo.sh
|
||||
nginx_site_load_balance_method: ip_hash
|
||||
nginx_site_proxy:
|
||||
- https://oci-node01.home.foo.sh
|
||||
- https://oci-node02.home.foo.sh
|
||||
- role: nginx/site
|
||||
site: influxdb.foo.sh
|
||||
proxy: https://influxdb01.home.foo.sh/
|
||||
- role: nginx/site
|
||||
site: iot.foo.sh
|
||||
redirect: https://www.foo.sh/
|
||||
- role: nginx/site
|
||||
site: munin.foo.sh
|
||||
proxy: https://munin01.home.foo.sh/
|
||||
- role: nginx/site
|
||||
site: mirrors.foo.sh
|
||||
proxy: https://mirror01.home.foo.sh/
|
||||
- role: nginx/site
|
||||
site: noc.foo.sh
|
||||
proxy:
|
||||
- role: nginx_site
|
||||
nginx_site_name: audiobooks.foo.sh
|
||||
nginx_site_proxy: https://audiobooks02.home.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: autoconfig.foo.sh
|
||||
- role: nginx_site
|
||||
nginx_site_name: boot.foo.sh
|
||||
- role: nginx_site
|
||||
nginx_site_name: bitbucket.foo.sh
|
||||
nginx_site_redirect: https://bitbucket.org/tmakinen/
|
||||
- role: nginx_site
|
||||
nginx_site_name: cctv.foo.sh
|
||||
nginx_site_proxy: https://frigate02.home.foo.sh/frigate/
|
||||
- role: nginx_site
|
||||
nginx_site_name: certbot.home.foo.sh
|
||||
nginx_site_proxy: https://certbot.home.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: chat.foo.sh
|
||||
nginx_site_proxy:
|
||||
- https://oci-node01.home.foo.sh/rocketchat/
|
||||
- https://oci-node02.home.foo.sh/rocketchat/
|
||||
- role: nginx_site
|
||||
nginx_site_name: collab.foo.sh
|
||||
nginx_site_proxy: https://collab01.home.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: devel01.foo.sh
|
||||
nginx_site_proxy: https://devel01.home.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: dns.home.foo.sh
|
||||
nginx_site_redirect: https://www.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: forgejo.foo.sh
|
||||
nginx_site_redirect: https://git.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: git.foo.sh
|
||||
nginx_site_proxy: https://forgejo02.home.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: gitea.foo.sh
|
||||
nginx_site_redirect: https://git.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: ha.foo.sh
|
||||
nginx_site_proxy: https://homeassistant01.home.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: id.foo.sh
|
||||
nginx_site_proxy:
|
||||
- https://oci-node01.home.foo.sh
|
||||
- https://oci-node02.home.foo.sh
|
||||
- role: nginx_site
|
||||
nginx_site_name: idp.foo.sh
|
||||
nginx_site_proxy: https://oci-node01.home.foo.sh/ipsilon/
|
||||
- role: nginx_site
|
||||
nginx_site_name: influxdb.foo.sh
|
||||
nginx_site_proxy: https://influxdb01.home.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: iot.foo.sh
|
||||
nginx_site_redirect: https://www.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: mirrors.foo.sh
|
||||
nginx_site_proxy: https://mirror02.home.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: movies.foo.sh
|
||||
nginx_site_proxy:
|
||||
- https://oci-node01.home.foo.sh/php4dvd/
|
||||
- role: nginx_site
|
||||
nginx_site_name: mta-sts.foo.sh
|
||||
- role: nginx_site
|
||||
nginx_site_name: noc.foo.sh
|
||||
nginx_site_proxy:
|
||||
- https://oci-node01.home.foo.sh/grafana/
|
||||
- https://oci-node02.home.foo.sh/grafana/
|
||||
- role: nginx/site
|
||||
site: print.foo.sh
|
||||
proxy: https://print01.home.foo.sh:631/
|
||||
- role: nginx/site
|
||||
site: registry.foo.sh
|
||||
proxy: ["registry01.home.foo.sh:5000", "registry02.home.foo.sh:5000"]
|
||||
- role: nginx/site
|
||||
site: webmail.foo.sh
|
||||
proxy:
|
||||
- role: nginx_site
|
||||
nginx_site_name: print.foo.sh
|
||||
nginx_site_proxy: https://print01.home.foo.sh:631/
|
||||
- role: nginx_site
|
||||
nginx_site_name: registry.foo.sh
|
||||
nginx_site_proxy:
|
||||
- "registry01.home.foo.sh:5000"
|
||||
- "registry02.home.foo.sh:5000"
|
||||
- role: nginx_site
|
||||
nginx_site_name: scan.foo.sh
|
||||
nginx_site_proxy:
|
||||
- https://sane02.home.foo.sh/scanservjs/
|
||||
- role: nginx_site
|
||||
nginx_site_name: webmail.foo.sh
|
||||
nginx_site_load_balance_method: ip_hash
|
||||
nginx_site_proxy:
|
||||
- https://oci-node01.home.foo.sh/roundcube/
|
||||
- role: nginx/site
|
||||
site: wpad.foo.sh
|
||||
- role: nginx/site
|
||||
site: www.foo.sh
|
||||
- role: nginx/site
|
||||
site: zm.foo.sh
|
||||
proxy: https://zm02.home.foo.sh/
|
||||
- https://oci-node02.home.foo.sh/roundcube/
|
||||
- role: nginx_site
|
||||
nginx_site_name: wpad.foo.sh
|
||||
- role: nginx_site
|
||||
nginx_site_name: www.foo.sh
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
- base
|
||||
- ifstated
|
||||
- relayd
|
||||
- nginx/server
|
||||
- role: nginx/site
|
||||
site: ldap.foo.sh
|
||||
redirect: https://www.foo.sh/
|
||||
- role: nginx/site
|
||||
site: ldap01.foo.sh
|
||||
redirect: https://www.foo.sh/
|
||||
- role: nginx/site
|
||||
site: loghost.foo.sh
|
||||
redirect: https://www.foo.sh/
|
||||
- nginx
|
||||
- role: nginx_site
|
||||
nginx_site_name: ldap.foo.sh
|
||||
nginx_site_redirect: https://www.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: ldap01.foo.sh
|
||||
nginx_site_redirect: https://www.foo.sh/
|
||||
- role: nginx_site
|
||||
nginx_site_name: loghost.foo.sh
|
||||
nginx_site_redirect: https://www.foo.sh/
|
||||
|
|
39
playbooks/sane.yml
Normal file
39
playbooks/sane.yml
Normal file
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
- name: Deploy KVM virtual machines
|
||||
ansible.builtin.import_playbook: include/deploy-kvm-guest.yml
|
||||
vars:
|
||||
myhosts: sane
|
||||
|
||||
- name: Configure instance
|
||||
hosts: sane
|
||||
user: root
|
||||
gather_facts: true
|
||||
|
||||
vars_files:
|
||||
- "{{ ansible_private }}/vars.yml"
|
||||
|
||||
roles:
|
||||
- base
|
||||
- sane
|
||||
- scanservjs
|
||||
- mod_auth_gssapi
|
||||
- role: keytab
|
||||
keytab_path: /etc/httpd/httpd.keytab
|
||||
keytab_principals: HTTP/scan.foo.sh@FOO.SH
|
||||
keytab_group: apache
|
||||
|
||||
tasks:
|
||||
- name: Require authentication for scanservjs
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/httpd/conf.local.d/scanservjs-auth.conf
|
||||
content: |
|
||||
<Location /scanservjs>
|
||||
AuthType GSSAPI
|
||||
GssapiBasicAuth On
|
||||
AuthName "Password Required"
|
||||
Require valid-user
|
||||
</Location>
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart apache
|
|
@ -15,7 +15,7 @@
|
|||
roles:
|
||||
- base
|
||||
- role: keytab
|
||||
principals:
|
||||
keytab_principals:
|
||||
- "host/{{ inventory_hostname }}@{{ kerberos_realm }}"
|
||||
- "nfs/{{ inventory_hostname }}@{{ kerberos_realm }}"
|
||||
- nfs_client
|
||||
|
@ -24,9 +24,8 @@
|
|||
- thinlinc_server
|
||||
- epel_repo
|
||||
- foosh_repo
|
||||
- powertools_repo
|
||||
- role: nginx/server
|
||||
plaintext: true
|
||||
- role: nginx
|
||||
nginx_plaintext: true
|
||||
|
||||
tasks:
|
||||
- name: Install extra package groups
|
||||
|
@ -63,6 +62,7 @@
|
|||
- pandoc
|
||||
- php-cli
|
||||
- python3-netaddr
|
||||
- python3-requests
|
||||
- rcs
|
||||
- rpmlint
|
||||
- syslinux
|
||||
|
@ -71,7 +71,6 @@
|
|||
- tmux
|
||||
- whois
|
||||
- wireshark
|
||||
- wkhtmltopdf
|
||||
- yamllint
|
||||
- zsh
|
||||
loop_control:
|
||||
|
@ -98,6 +97,6 @@
|
|||
content: |
|
||||
Host *.home.foo.sh !gw.home.foo.sh
|
||||
ProxyJump root@gw.home.foo.sh
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
roles:
|
||||
- base
|
||||
- role: keytab
|
||||
principals:
|
||||
keytab_principals:
|
||||
- "host/{{ inventory_hostname }}@FOO.SH"
|
||||
- "nfs/{{ inventory_hostname }}@FOO.SH"
|
||||
- nfs_client
|
||||
|
@ -48,7 +48,7 @@
|
|||
AllowOverride AuthConfig FileInfo Indexes Limit
|
||||
Require all granted
|
||||
</Directory>
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart apache
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
passno: "0"
|
||||
dump: "0"
|
||||
state: mounted
|
||||
when: inventory_hostname == "vmhost02.home.foo.sh"
|
||||
- name: Mount /export/libvirt/nvme
|
||||
ansible.posix.mount:
|
||||
name: /export/libvirt/nvme
|
||||
|
@ -26,10 +27,10 @@
|
|||
passno: "0"
|
||||
dump: "0"
|
||||
state: mounted
|
||||
- name: Mount /export/libvirt/ssd
|
||||
- name: Mount /export/libvirt/os
|
||||
ansible.posix.mount:
|
||||
name: /export/libvirt/ssd
|
||||
src: LABEL=ssd
|
||||
name: /export/libvirt/os
|
||||
src: LABEL=os
|
||||
fstype: xfs
|
||||
opts: noatime,noexec,nosuid,nodev
|
||||
passno: "0"
|
||||
|
@ -39,3 +40,4 @@
|
|||
roles:
|
||||
- base
|
||||
- kvm_host
|
||||
- ssh_known_hosts
|
||||
|
|
86
roles/ansible_host/files/urls.py.patch
Normal file
86
roles/ansible_host/files/urls.py.patch
Normal file
|
@ -0,0 +1,86 @@
|
|||
--- ./urls.py.orig 2024-03-27 18:55:18.077213253 +0000
|
||||
+++ urls.py 2024-03-27 18:21:07.613270952 +0000
|
||||
@@ -535,15 +535,18 @@
|
||||
UnixHTTPSConnection = None
|
||||
if hasattr(httplib, 'HTTPSConnection') and hasattr(urllib_request, 'HTTPSHandler'):
|
||||
class CustomHTTPSConnection(httplib.HTTPSConnection): # type: ignore[no-redef]
|
||||
- def __init__(self, *args, **kwargs):
|
||||
+ def __init__(self, client_cert=None, client_key=None, *args, **kwargs):
|
||||
httplib.HTTPSConnection.__init__(self, *args, **kwargs)
|
||||
self.context = None
|
||||
if HAS_SSLCONTEXT:
|
||||
self.context = self._context
|
||||
elif HAS_URLLIB3_PYOPENSSLCONTEXT:
|
||||
self.context = self._context = PyOpenSSLContext(PROTOCOL)
|
||||
- if self.context and self.cert_file:
|
||||
- self.context.load_cert_chain(self.cert_file, self.key_file)
|
||||
+
|
||||
+ self._client_cert = client_cert
|
||||
+ self._client_key = client_key
|
||||
+ if self.context and self._client_cert:
|
||||
+ self.context.load_cert_chain(self._client_cert, self._client_key)
|
||||
|
||||
def connect(self):
|
||||
"Connect to a host on a given (SSL) port."
|
||||
@@ -564,10 +567,10 @@
|
||||
if HAS_SSLCONTEXT or HAS_URLLIB3_PYOPENSSLCONTEXT:
|
||||
self.sock = self.context.wrap_socket(sock, server_hostname=server_hostname)
|
||||
elif HAS_URLLIB3_SSL_WRAP_SOCKET:
|
||||
- self.sock = ssl_wrap_socket(sock, keyfile=self.key_file, cert_reqs=ssl.CERT_NONE, # pylint: disable=used-before-assignment
|
||||
- certfile=self.cert_file, ssl_version=PROTOCOL, server_hostname=server_hostname)
|
||||
+ self.sock = ssl_wrap_socket(sock, keyfile=self._client_key, cert_reqs=ssl.CERT_NONE, # pylint: disable=used-before-assignment
|
||||
+ certfile=self._client_cert, ssl_version=PROTOCOL, server_hostname=server_hostname)
|
||||
else:
|
||||
- self.sock = ssl.wrap_socket(sock, keyfile=self.key_file, certfile=self.cert_file, ssl_version=PROTOCOL)
|
||||
+ self.sock = ssl.wrap_socket(sock, keyfile=self._client_key, certfile=self._client_cert, ssl_version=PROTOCOL)
|
||||
|
||||
class CustomHTTPSHandler(urllib_request.HTTPSHandler): # type: ignore[no-redef]
|
||||
|
||||
@@ -602,10 +605,6 @@
|
||||
return self.do_open(self._build_https_connection, req)
|
||||
|
||||
def _build_https_connection(self, host, **kwargs):
|
||||
- kwargs.update({
|
||||
- 'cert_file': self.client_cert,
|
||||
- 'key_file': self.client_key,
|
||||
- })
|
||||
try:
|
||||
kwargs['context'] = self._context
|
||||
except AttributeError:
|
||||
@@ -613,7 +612,7 @@
|
||||
if self._unix_socket:
|
||||
return UnixHTTPSConnection(self._unix_socket)(host, **kwargs)
|
||||
if not HAS_SSLCONTEXT:
|
||||
- return CustomHTTPSConnection(host, **kwargs)
|
||||
+ return CustomHTTPSConnection(host, client_cert=self.client_cert, client_key=self.client_key, **kwargs)
|
||||
return httplib.HTTPSConnection(host, **kwargs)
|
||||
|
||||
@contextmanager
|
||||
@@ -979,7 +978,7 @@
|
||||
pass
|
||||
|
||||
|
||||
-def make_context(cafile=None, cadata=None, ciphers=None, validate_certs=True):
|
||||
+def make_context(cafile=None, cadata=None, ciphers=None, validate_certs=True, client_cert=None, client_key=None):
|
||||
if ciphers is None:
|
||||
ciphers = []
|
||||
|
||||
@@ -1006,6 +1005,9 @@
|
||||
if ciphers:
|
||||
context.set_ciphers(':'.join(map(to_native, ciphers)))
|
||||
|
||||
+ if client_cert:
|
||||
+ context.load_cert_chain(client_cert, keyfile=client_key)
|
||||
+
|
||||
return context
|
||||
|
||||
|
||||
@@ -1514,6 +1516,8 @@
|
||||
cadata=cadata,
|
||||
ciphers=ciphers,
|
||||
validate_certs=validate_certs,
|
||||
+ client_cert=client_cert,
|
||||
+ client_key=client_key,
|
||||
)
|
||||
handlers.append(HTTPSClientAuthHandler(client_cert=client_cert,
|
||||
client_key=client_key,
|
|
@ -2,4 +2,4 @@
|
|||
dependencies:
|
||||
- {role: epel_repo}
|
||||
- {role: git}
|
||||
- {role: nginx/server}
|
||||
- {role: nginx}
|
||||
|
|
|
@ -7,35 +7,22 @@
|
|||
- ansible
|
||||
- ansible-collection-ansible-posix
|
||||
- ansible-collection-community-general
|
||||
- python3.11-dns # required for lookup('dig', 'hostname')
|
||||
- python3-netaddr # required by iptables role
|
||||
- patch # needed in next step
|
||||
- python3.9-dns # required for lookup('dig', 'hostname')
|
||||
- python3.9-ldap # required for ldap modules
|
||||
- python3.9-netaddr # required by iptables role
|
||||
|
||||
- name: Create python3.11 lib directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
with_items:
|
||||
- /usr/local/lib/python3.11
|
||||
- /usr/local/lib/python3.11/site-packages
|
||||
|
||||
- name: Kludge to add netaddr to python3.11 until package is released
|
||||
ansible.builtin.copy:
|
||||
dest: /usr/local/lib/python3.11/site-packages/netaddr
|
||||
src: /usr/lib/python3.9/site-packages/netaddr
|
||||
mode: preserve
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
remote_src: true
|
||||
- name: Patch ansible to support python 3.12 clients
|
||||
ansible.posix.patch:
|
||||
src: urls.py.patch
|
||||
dest: /usr/lib/python3.9/site-packages/ansible/module_utils/urls.py
|
||||
|
||||
- name: Create private directory and force permissions
|
||||
ansible.builtin.file:
|
||||
path: /export/private
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0700
|
||||
mode: "0700"
|
||||
state: directory
|
||||
|
||||
- name: Link private directory
|
||||
|
@ -55,7 +42,7 @@
|
|||
- name: Clone ansible repository
|
||||
ansible.builtin.git:
|
||||
dest: /srv/ansible
|
||||
repo: https://git.foo.sh/ansible.git
|
||||
repo: https://git.foo.sh/foo.sh/ansible.git
|
||||
update: false
|
||||
version: master
|
||||
|
||||
|
@ -72,7 +59,7 @@
|
|||
ansible.builtin.copy:
|
||||
src: nginx.conf
|
||||
dest: /etc/nginx/conf.d/{{ inventory_hostname }}/ansible.conf
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart nginx
|
||||
|
@ -83,4 +70,4 @@
|
|||
src: root-bashrc.sh
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
mode: 0600
|
||||
mode: "0600"
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
ansible.builtin.file:
|
||||
state: directory
|
||||
path: "{{ item }}"
|
||||
mode: 0755
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
seuser: _default
|
||||
|
@ -54,7 +54,7 @@
|
|||
ansible.builtin.template:
|
||||
src: ssl.conf.j2
|
||||
dest: /etc/httpd/conf.local.d/ssl.conf
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart apache
|
||||
|
@ -63,7 +63,7 @@
|
|||
ansible.builtin.template:
|
||||
src: site.conf.j2
|
||||
dest: "/etc/httpd/conf.local.d/{{ inventory_hostname }}.conf"
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart apache
|
||||
|
|
5065
roles/aten_pdu/files/ATEN-PE-CFG_str_1.3.128.mib
Normal file
5065
roles/aten_pdu/files/ATEN-PE-CFG_str_1.3.128.mib
Normal file
File diff suppressed because it is too large
Load diff
93
roles/aten_pdu/files/aten-mqtt-publish.sh
Executable file
93
roles/aten_pdu/files/aten-mqtt-publish.sh
Executable file
|
@ -0,0 +1,93 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
umask 077
|
||||
|
||||
community="public"
|
||||
|
||||
if [ "${1:-}" = "-n" ]; then
|
||||
_noop=true
|
||||
else
|
||||
_noop=false
|
||||
fi
|
||||
|
||||
mqtt_send() {
|
||||
topic="$1"
|
||||
value="$2"
|
||||
|
||||
tlsdir="$(openssl version -d | sed -e 's/^OPENSSLDIR: "\(.\+\)"$/\1/')"
|
||||
mosquitto_pub -h mqtt02.home.foo.sh -t "$topic" -m "$value" \
|
||||
--cafile "${tlsdir}/certs/ca.crt" \
|
||||
--key "${tlsdir}/private/$(hostname -f).key" \
|
||||
--cert "${tlsdir}/certs/$(hostname -f).crt"
|
||||
}
|
||||
|
||||
snmp_get() {
|
||||
host="$1"
|
||||
key="$2"
|
||||
snmpget -v 1 -c "$community" "$host" -Oqv -m ATEN-PE-CFG "$key" | tr -d '"'
|
||||
}
|
||||
|
||||
# only run script if first vrrp interface is in master state
|
||||
for state in /run/keepalived/*.state ; do
|
||||
if [ "$(cat "$state")" != "MASTER" ]; then
|
||||
exit 0
|
||||
fi
|
||||
break
|
||||
done
|
||||
|
||||
ldapsearch -Q -LLL "(&(objectClass=device)(description=Aten PE*))" cn l | awk '
|
||||
{
|
||||
if ($1 == "cn:") {
|
||||
cn = $2
|
||||
}
|
||||
if ($1 == "l:") {
|
||||
l = substr($0, 3)
|
||||
}
|
||||
if ($0 == "" && cn != "" && l != "") {
|
||||
print cn l
|
||||
cn = ""
|
||||
l = ""
|
||||
}
|
||||
}
|
||||
' | while read -r name location
|
||||
do
|
||||
snmpwalk -v 1 -c "$community" "$name" -Oq \
|
||||
-m ATEN-PE-CFG ATEN-PE-CFG::outletName | while read -r port device
|
||||
do
|
||||
port="$(echo "$port" | cut -d '.' -f 2)"
|
||||
device="$(echo "$device" | tr -d '"')"
|
||||
case "$device" in
|
||||
"N/A"|"00 "|"unused")
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
if device_name="$(ldapsearch -Q -LLL \
|
||||
"(&(objectClass=device)(cn=${device}.*))" cn | awk "
|
||||
{
|
||||
if (\$1 == \"cn:\") {
|
||||
if (name) {
|
||||
exit 1
|
||||
}
|
||||
name=\$2
|
||||
}
|
||||
} END {
|
||||
if (!name) {
|
||||
exit 1
|
||||
}
|
||||
print name
|
||||
}
|
||||
")" ; then
|
||||
device="$device_name"
|
||||
fi
|
||||
for key in Current Power Voltage ; do
|
||||
topic="home/${location}/${device}/$(echo "$key" | tr '[:upper:]' '[:lower:]')"
|
||||
value="$(snmp_get "$name" "ATEN-PE-CFG::outlet${key}.${port}")"
|
||||
if $_noop ; then
|
||||
echo "${topic} -> ${value}"
|
||||
else
|
||||
mqtt_send "$topic" "$value"
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
3
roles/aten_pdu/meta/main.yml
Normal file
3
roles/aten_pdu/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- {role: ldap}
|
31
roles/aten_pdu/tasks/main.yml
Normal file
31
roles/aten_pdu/tasks/main.yml
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
- name: Install packages
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
state: installed
|
||||
with_items:
|
||||
- mosquitto
|
||||
- net-snmp-utils
|
||||
|
||||
# https://www.aten.com/eu/en/products/power-distribution-&-racks/rack-pdu/pe8108/
|
||||
- name: Install custom mib
|
||||
ansible.builtin.copy:
|
||||
dest: /usr/share/snmp/mibs/ATEN-PE-CFG.txt
|
||||
src: ATEN-PE-CFG_str_1.3.128.mib
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Install mqtt publish script
|
||||
ansible.builtin.copy:
|
||||
dest: /usr/local/bin/aten-mqtt-publish
|
||||
src: aten-mqtt-publish.sh
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Add mqtt publish cron job
|
||||
ansible.builtin.cron:
|
||||
name: aten-mqtt-publish
|
||||
job: /usr/local/bin/aten-mqtt-publish
|
||||
minute: "*/5"
|
4
roles/audiobookshelf/files/audiobookshelf.default
Normal file
4
roles/audiobookshelf/files/audiobookshelf.default
Normal file
|
@ -0,0 +1,4 @@
|
|||
METADATA_PATH=/srv/audiobookshelf/metadata
|
||||
CONFIG_PATH=/srv/audiobookshelf/config
|
||||
PORT=13378
|
||||
HOST=127.0.0.1
|
30
roles/audiobookshelf/files/meta.md
Normal file
30
roles/audiobookshelf/files/meta.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
= Preparing files for upload =
|
||||
|
||||
== Filenames ==
|
||||
|
||||
Filenames should always contain track number (and optionally disc number) with leading zeros first and subtitle after that. Few exmaples:
|
||||
|
||||
```
|
||||
01. Luku.mp3
|
||||
01. Osa.mp3
|
||||
CD 1 - 01.mp3
|
||||
```
|
||||
|
||||
Directory should also contain `cover.jpg` with book cover picture and `desc.txt` containing book description.
|
||||
|
||||
== Metadata (id3 tags) ==
|
||||
|
||||
First clear old tags then set new ones:
|
||||
|
||||
```
|
||||
id3v2 -D "01. Osa.mp3"
|
||||
id3v2 \
|
||||
--TPE1 "Douglas Adams" \
|
||||
--TALB "$(echo 'Linnunradan käsikirja liftareille' | iconv -f utf-8 -t iso-8859-1)" \
|
||||
--TCOM "$(echo 'Heikki Kinnunen,Pekka Autiovuori,Yrjö Järvinen,Martti Järvinen,Esa Saario,Kauko Helavirta,Aila Svedberg' | iconv -f utf-8 -t iso-8859-1)" \
|
||||
--TLAN "fi" \
|
||||
--TPUB "Yleisradio" \
|
||||
--TYER 1984 \
|
||||
--genre "Science Fiction/Fiction/Humor" \
|
||||
"01. Osa.mp3"
|
||||
```
|
5
roles/audiobookshelf/handlers/main.yml
Normal file
5
roles/audiobookshelf/handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
- name: Restart audiobookshelf
|
||||
ansible.builtin.service:
|
||||
name: audiobookshelf
|
||||
state: restarted
|
3
roles/audiobookshelf/meta/main.yml
Normal file
3
roles/audiobookshelf/meta/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
dependencies:
|
||||
- {role: nginx}
|
90
roles/audiobookshelf/tasks/main.yml
Normal file
90
roles/audiobookshelf/tasks/main.yml
Normal file
|
@ -0,0 +1,90 @@
|
|||
---
|
||||
- name: Enable repository
|
||||
ansible.builtin.yum_repository:
|
||||
name: audiobookshelf
|
||||
baseurl: https://raw.githubusercontent.com/lkiesow/audiobookshelf-rpm/el$releasever/
|
||||
description: Audiobookshelf el$releasever repository
|
||||
gpgcheck: true
|
||||
gpgkey: https://raw.githubusercontent.com/lkiesow/audiobookshelf-rpm/main/audiobookshelf-rpm.key
|
||||
enabled: true
|
||||
|
||||
- name: Install packcages
|
||||
ansible.builtin.package:
|
||||
name: audiobookshelf
|
||||
state: present
|
||||
|
||||
- name: Create data directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: "0770"
|
||||
owner: root
|
||||
group: audiobookshelf
|
||||
with_items:
|
||||
- /export/audiobookshelf
|
||||
- /export/audiobookshelf/audiobooks
|
||||
- /export/audiobookshelf/config
|
||||
- /export/audiobookshelf/metadata
|
||||
- /export/audiobookshelf/podcasts
|
||||
- /export/audiobookshelf/radioplays
|
||||
|
||||
- name: Link data directory
|
||||
ansible.builtin.file:
|
||||
dest: /srv/audiobookshelf
|
||||
src: /export/audiobookshelf
|
||||
state: link
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
follow: false
|
||||
|
||||
- name: Copy naming instructions
|
||||
ansible.builtin.copy:
|
||||
dest: /srv/audiobookshelf/audiobooks/README.md
|
||||
src: meta.md
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
- name: Copy service config
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/default/audiobookshelf
|
||||
src: audiobookshelf.default
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart audiobookshelf
|
||||
|
||||
- name: Enable service
|
||||
ansible.builtin.service:
|
||||
name: audiobookshelf
|
||||
state: started
|
||||
enabled: true
|
||||
|
||||
- name: Allow nginx to connect audiobookshelf
|
||||
ansible.posix.seboolean:
|
||||
name: httpd_can_network_connect
|
||||
state: true
|
||||
persistent: true
|
||||
|
||||
- name: Copy nginx config
|
||||
ansible.builtin.copy:
|
||||
dest: "/etc/nginx/conf.d/{{ inventory_hostname }}/audiobookshelf.conf"
|
||||
content: |
|
||||
location / {
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host audiobooks.foo.sh;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_http_version 1.1;
|
||||
proxy_pass http://127.0.0.1:13378/;
|
||||
location /audiobookshelf/api/upload {
|
||||
# increase size to allow uploads
|
||||
client_max_body_size 10g;
|
||||
proxy_pass http://127.0.0.1:13378/api/upload;
|
||||
}
|
||||
}
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart nginx
|
|
@ -10,11 +10,19 @@
|
|||
group: authcheck
|
||||
shell: /sbin/nologin
|
||||
|
||||
- name: Enable user lingering
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- loginctl
|
||||
- enable-linger
|
||||
- authcheck
|
||||
creates: /var/lib/systemd/linger/authcheck
|
||||
|
||||
- name: Get container source
|
||||
ansible.builtin.git:
|
||||
dest: /usr/local/src/docker-authcheck
|
||||
repo: https://github.com/foo-sh/docker-authcheck.git
|
||||
update: false
|
||||
update: true
|
||||
version: main
|
||||
notify: Rebuild authcheck-container
|
||||
|
||||
|
@ -22,7 +30,7 @@
|
|||
ansible.builtin.template:
|
||||
dest: /etc/systemd/system/authcheck-container.service
|
||||
src: authcheck-container.service.j2
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
||||
|
@ -39,7 +47,7 @@
|
|||
location /authcheck {
|
||||
proxy_pass http://127.0.0.1:8003/;
|
||||
}
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart nginx
|
||||
|
|
3
roles/autofs/defaults/main.yml
Normal file
3
roles/autofs/defaults/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
autofs_home: true
|
||||
autofs_roles: true
|
|
@ -34,7 +34,7 @@
|
|||
ansible.builtin.template:
|
||||
dest: /etc/autofs_ldap_auth.conf
|
||||
src: autofs_ldap_auth.conf.j2
|
||||
mode: 0600
|
||||
mode: "0600"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart autofs
|
||||
|
@ -43,7 +43,7 @@
|
|||
ansible.builtin.template:
|
||||
dest: /etc/auto.master
|
||||
src: auto.master.j2
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart autofs
|
||||
|
@ -74,7 +74,7 @@
|
|||
ansible.builtin.copy:
|
||||
dest: "/etc/profile.d/{{ item }}"
|
||||
src: "{{ item }}"
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
with_items:
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue