Compare commits

...
Sign in to create a new pull request.

589 commits

Author SHA1 Message Date
14c7189429 Fix custom firewall rules for print hosts 2025-04-22 17:55:35 +00:00
1ff80f9171 Fix serial port number from homeassistant hosts 2025-04-22 17:28:14 +00:00
ec8ae902ed frigate: Get cameras from LDAP 2025-04-20 16:52:23 +00:00
c88f8e6374 Get IP cameras from LDAP 2025-04-20 16:21:25 +00:00
c95c7d1308 Fix custom firewall rules on frigate hosts 2025-04-20 16:12:35 +00:00
e6fe9af993 aten_pdu: Fix tabs to spaces 2025-04-20 15:04:10 +00:00
d4e9c308e2 aten_pdu: Fix script permissions 2025-04-20 15:02:52 +00:00
2ef627998f aten_pdu: Use more strict LDAP query 2025-04-20 15:02:21 +00:00
b1481de12c ha_mqtt_configd: Fix underscore handling in topics 2025-04-20 14:28:26 +00:00
c820614f44 aten_pdu: Get PDU location from LDAP 2025-04-20 14:22:39 +00:00
190a377076 aten_pdu: Try to get full hosntname for mqtt pub 2025-04-19 20:05:48 +00:00
20c91fad84 aten_pdu: Add noop mode to mqtt publish script 2025-04-19 20:02:30 +00:00
d4d68dc962 sshd_cert: Renew cert if it's close to expire 2025-04-19 19:29:38 +00:00
48beb781b3 mosquitto: Allow nms hosts to write mqtt messages 2025-04-19 19:25:02 +00:00
e790276359 routeros: Add script to publish poe power to mqtt 2025-04-19 19:20:02 +00:00
ae59e21a2e homeassistant: Disable manual mqtt configuration 2025-04-19 19:14:07 +00:00
ed4debd59d ha_mqtt_configd: Add icon for power measurements 2025-04-19 19:12:46 +00:00
bb572040ef Add ha_mqtt_configd to mqtt hosts 2025-04-19 18:56:27 +00:00
2fedbd505b ha_mqtt_configd: Initial version of role 2025-04-19 18:55:58 +00:00
f114a2d5d9 routeros: Rename role 2025-04-06 17:32:32 +00:00
4c9a7dbcfb Add aten_pdu role to nms hosts 2025-04-06 16:44:47 +00:00
211e04ae99 aten_pdu: First version of role 2025-04-06 16:44:30 +00:00
2b8b9f69f7 Fix netmask from virtual ip on nms hosts 2025-04-06 16:38:30 +00:00
bfa4167822 network: Fix keepalived ip address config 2025-04-06 15:16:27 +00:00
4772b948fa Fix vrrp priority from nms02 host 2025-04-05 20:06:34 +00:00
5cedf628c8 Fix firewall rules on nms hosts for VRRP 2025-04-05 19:53:39 +00:00
ededecd167 nftables: Fix support for raw rules 2025-04-05 19:51:54 +00:00
46a15fb9ce nftables: Validate config before applying 2025-04-05 19:51:35 +00:00
a7860a0104 network: Enable keepalived script security 2025-04-05 19:29:52 +00:00
043104f062 network: Write keepalived interface status to file 2025-04-05 18:48:16 +00:00
d6cc79dcb3 Refactor mqtt topics for shelly plugs 2025-04-05 17:37:56 +00:00
95c66d976f Add mqtt-tail script to adm hosts 2025-04-05 16:35:24 +00:00
776b562abe routeros_firmware: Use real tmpfile 2025-04-04 16:01:43 +00:00
d282b132ab routeros_firmware: Fix tabs to spaces 2025-04-04 07:58:33 +00:00
56ed9010ac node_exporter: Add verbose option 2025-04-04 05:46:33 +00:00
b6bceb64a4 node_exporter: Use real tempfile 2025-04-04 05:29:19 +00:00
c2a39ecc56 Add dhcpd to nms hosts 2025-04-02 21:47:47 +00:00
1aaf78c3ab Update software versions 2025-03-11 20:45:32 +00:00
ffe43b8498 web_logs: Add script to combine log files 2025-03-08 20:59:48 +00:00
cf87333ef8 Update site.yml 2025-03-06 19:31:56 +00:00
020b2afa0d forgejo: Use correct variable for jwk key 2025-03-06 19:31:26 +00:00
36947f349b Migrate from gitea to forgejo 2025-03-06 19:31:01 +00:00
5bed083800 Migrate gitea user to forgejo 2025-03-06 19:30:25 +00:00
ba2770c696 Remove obsolete gitea roles 2025-03-06 19:29:39 +00:00
b02af6f9e6 Remove gitea hosts 2025-03-06 19:29:04 +00:00
9a5f632ce4 Add forgejo hosts 2025-03-06 19:27:23 +00:00
c479b7fcea forgejo: Initial version of role 2025-03-06 19:22:39 +00:00
4031afdbdb Update rockechat version to 7.4.0 2025-03-05 17:29:25 +00:00
bbe61d4180 Add audiobooks.foo.sh virtual host 2025-03-01 19:12:10 +00:00
ae7ec4680f Add audiobook hosts 2025-03-01 19:11:33 +00:00
4c7c0e3261 audiobookshelf: Initial version of role 2025-03-01 19:10:16 +00:00
a793f59a33 ipsilon: Fix configuration 2025-03-01 19:09:07 +00:00
5f412a50c5 unbound: Use multiple local forwarders 2025-02-21 15:46:57 +00:00
d4d11508bc systemd_resolved: Remove double spaces 2025-02-20 22:15:04 +00:00
6cba945cb8 Move to static DNS servers and use DoT
This now affects only Fedora and OpenBSD hosts
2025-02-20 21:52:58 +00:00
21e0c49593 No need to disable resolvd after moving to unwind 2025-02-20 21:51:08 +00:00
57e43b1396 systemd_resolved: Don't use dns from connections 2025-02-20 21:11:08 +00:00
5c7bb11c0c frigate: Fix config file permissions 2025-02-16 18:49:50 +00:00
b6f4b8cd51 Update software versions 2025-02-16 17:02:14 +00:00
cc7698436f Update frigate to 0.15.0 2025-02-16 16:24:20 +00:00
f3d9e52f7e Fix install order on dna-gw hosts 2025-02-15 17:16:17 +00:00
821e783702 Update DNA gw IP's 2025-02-08 17:25:34 +00:00
423cafe98d routeros_firmware: Use dedicated user for download 2025-02-07 07:25:45 +00:00
39e504dd61 Update gitea to 1.23.3 2025-02-06 07:52:21 +00:00
80ac346c4e nginx: Fix removing old logs 2025-02-02 15:42:09 +00:00
a226b1d560 Fix ldap_master variable handling 2025-02-02 15:41:45 +00:00
5fdeef32e8 Add apps.foo.sh virtual host 2025-02-02 15:39:26 +00:00
eaf1b3ffb9 backup_base: Add missing defaults file 2025-02-02 15:24:20 +00:00
1ae9d88346 ldap_server: Allow everyone to read root object 2025-02-02 15:21:59 +00:00
b3ebfa71e7 ldap_server: Refactor variables 2025-02-02 15:21:26 +00:00
d2fb048b7d backup_base: Fix data directory path 2025-02-02 15:19:38 +00:00
db91fe6345 base: Refactor export mount fact 2025-02-02 15:18:47 +00:00
dff8b4d72b Add mail relay to print hosts 2025-02-01 19:01:12 +00:00
4325511f35 Sort and group variables 2025-02-01 19:00:41 +00:00
a729049060 cups_server: Configure printers from LDAP
No modify supported just add and delete.
2025-02-01 18:36:49 +00:00
34624667dc Add printing support to adm and nms hosts 2025-02-01 17:24:07 +00:00
56d15d0cf1 Update software submodule 2025-02-01 17:19:43 +00:00
2468b1ffcd Update software submodule 2025-02-01 16:52:37 +00:00
12cb205ff5 Update software submodule 2025-02-01 16:38:01 +00:00
13eed06124 cups_server: Fix sharing options 2025-02-01 16:33:37 +00:00
3328152314 rocketchat: Update to 7.3.0 2025-02-01 15:17:41 +00:00
07a6e1b124 Fix yamllint errors 2025-01-31 19:15:12 +00:00
a935deb439 dhcpd: Read printers from LDAP 2025-01-31 19:12:06 +00:00
45557e0bc1 dhcpd: Add support for reading host data from LDAP 2025-01-31 19:11:09 +00:00
0530194ac0 base: Add ansible_server fact 2025-01-31 18:56:03 +00:00
20f1af0ee4 ansible_host: Add support for LDAP queries 2025-01-31 18:03:18 +00:00
dc9a3a0725 Limit access to hosts that have sssd running 2025-01-31 17:01:03 +00:00
2c423fc0ca sssd: Allow limiting access by groups 2025-01-31 16:42:23 +00:00
71a69af472 sssd: Sort and group config options 2025-01-31 16:42:02 +00:00
eaead4bc7f Allow kerberos logins to print hosts 2025-01-31 16:16:26 +00:00
139ef2183c Fix typo from sw-backup script 2025-01-31 15:51:35 +00:00
981b954682 keytab: Try make code cleaner 2025-01-30 20:05:47 +00:00
872115a9a9 keytab: Don't use hardcoded tempfile 2025-01-30 19:32:52 +00:00
243574e415 sssd: Better error handling 2025-01-30 19:17:45 +00:00
f0b1b064db mkhomedir: Convert shell to command 2025-01-30 19:13:32 +00:00
ad625d47d6 rsync_backup: Fix yamllint errors 2025-01-30 18:20:47 +00:00
27fbb3eca6 Update software submodule 2025-01-30 18:06:40 +00:00
5832a12084 Pass secrets to homeassistant playbook 2025-01-30 16:58:18 +00:00
5a4a6de8be Use device id's for passthrough 2025-01-30 16:57:17 +00:00
20626d18d5 Allow serial port passthrough to virtual machines 2025-01-30 16:56:35 +00:00
11fbb4a720 nginx: Add missing logrotate script 2025-01-30 12:32:49 +00:00
943ad5ef8b Add switch config backup script to nms hosts 2025-01-30 12:31:58 +00:00
ee6fbb48c7 routeros_firmware: Move README to own file 2025-01-30 12:31:29 +00:00
d9b6c2d27f nginx: Add custom logrotate script for OpenBSD 2025-01-30 12:30:33 +00:00
04b98d5b7f homeassistant: Add yamllint to check configs 2025-01-29 23:31:20 +00:00
e2fdee682d homeassistant: Automatically add shellies to mqtt 2025-01-29 23:30:44 +00:00
ec1b8cb9e6 homeassistant: Run service as non root user 2025-01-28 15:13:10 +00:00
8b90b85b8f blackbox_exporter: Don't create home directory 2025-01-27 04:43:43 +00:00
11e094eeda Fix nodered version 2025-01-26 21:20:19 +00:00
a0a70e4289 Add ESPSomfy plugin to homeassistant 2025-01-25 18:57:17 +00:00
d0699117bc Update homeassistant 2025-01-25 18:33:59 +00:00
0e570efebd nginx: Rotate logs daily on OpenBSD 2025-01-24 16:26:14 +00:00
1a71f92138 web_logs: Create data directories 2025-01-24 16:18:44 +00:00
a5dafee6cb nginx: Fix newsyslog config on OpenBSD 2025-01-24 16:13:24 +00:00
34daaee91e syslogd: Fix whitespaces from newsyslog config 2025-01-24 16:12:47 +00:00
fa42610bff Add more editors to adm hosts 2025-01-24 15:46:24 +00:00
8742d750a3 nginx: Remove RHEL8 support 2025-01-24 15:24:38 +00:00
ec405bb1c0 Add nginx_logsync role to proxy servers 2025-01-24 12:50:46 +00:00
8b7d8da733 Add web_logs role to log hosts 2025-01-24 12:50:20 +00:00
b116d3e2c0 Convert backup hosts to use new rclone role 2025-01-24 12:49:40 +00:00
53f30103b3 prometheus: Add unbound_exporter targets 2025-01-24 12:49:07 +00:00
74a517f942 unbound_exporter: Initial version of role 2025-01-24 12:48:36 +00:00
d0d9f3430a web_logs: Refactor role completely 2025-01-24 12:47:51 +00:00
b6131534f6 nginx_logsync: Initial version of role 2025-01-24 12:47:18 +00:00
af5655e131 rclone: Remove logs older than 30 days 2025-01-24 12:19:18 +00:00
338f4e2f0d rclone: Make role more modular 2025-01-24 11:41:49 +00:00
c3497c2440 nginx_site: Enable custom log format 2025-01-23 05:54:23 +00:00
7a6e4e596f nginx: Use custom log format 2025-01-23 05:53:44 +00:00
c8bbd563b4 base: Use systemd-resolved for Fedora hosts 2025-01-19 21:18:10 +00:00
cdd1495f0c dhcpd: Fix DNS server addresses 2025-01-19 18:40:49 +00:00
e1dd03e859 Add unbound_exporter to dna-gw hosts 2025-01-19 18:21:33 +00:00
964e841c1d unbound_exporter: Add TLS support
Currently unbound_exporter doesn't support TLS connections so proxy
connections through stunnel.
2025-01-19 17:51:18 +00:00
271eb09669 pf: Open unbound_exporter port for dna-gw hosts 2025-01-19 16:15:42 +00:00
ae491f8977 unbound_exporter: Initial version of role 2025-01-19 16:15:24 +00:00
d4bfc7586f unbound: Add better failover config 2025-01-18 19:14:08 +00:00
107a2cd48b Use correct password for virtual IP interface 2025-01-18 19:12:59 +00:00
86551d6dec Move nms.home.foo.sh to new address 2025-01-18 18:55:59 +00:00
4739a3758d node_exporter: Don't create home on user modify 2025-01-18 18:54:43 +00:00
231fe0103a unbound: Optimize CPU core usage 2025-01-18 18:47:04 +00:00
974595756c unbound: Add backup DNS server to external resolve 2025-01-18 18:33:23 +00:00
f6a8776a6e systemd_resolved: Initial version of role 2025-01-15 23:45:54 +00:00
8a9fd29c72 unbound: Refactor variables 2025-01-15 21:26:29 +00:00
ec4812a157 Add group based on domainname if found 2025-01-15 20:04:17 +00:00
0579a20768 Manually set nameservers for hosts in Vultr cloud 2025-01-15 18:55:04 +00:00
f0c66b63f3 unwind: Validate config before restart 2025-01-15 18:54:34 +00:00
7b6edbfe44 Add check-updates script 2025-01-15 18:43:44 +00:00
1bc3805ded node_exporter: Fix startup options for Fedora 2025-01-10 07:30:32 +00:00
b576f18c93 base: Simplify daily dnf download cron job 2025-01-10 06:37:17 +00:00
fff5b5a431 node_exporter: Drop os specific var files 2025-01-07 00:11:15 +00:00
d9c5d73889 Update Fedora installer to version 41 2025-01-07 00:10:33 +00:00
9a5cd91532 base: Make sure python dnf bindings are installed 2025-01-06 21:02:55 +00:00
fa7402a8eb network: Don't use static resolv.conf for OpenBSD 2025-01-06 20:28:29 +00:00
a1db16b329 base: Configure OpenBSD DNS using unwind 2025-01-06 20:28:11 +00:00
9696f406ce unwind: Initial version of role 2025-01-06 20:27:55 +00:00
e02e45c8a6 Only use lb dns server for relay and proxy hosts 2025-01-06 20:26:24 +00:00
cc0a16e3ee unbound: Don't listen to localhost on dna-gw hosts 2025-01-06 20:24:59 +00:00
29e747db42 nsd: Don't listen to localhost interface 2025-01-06 20:24:29 +00:00
9d5d05e713 Rotate DKIM keys 2025-01-03 17:16:50 +00:00
868041257d Move DKIM key selector to host inventory 2025-01-03 17:13:30 +00:00
ba98d5223b ipsilon: Convert oidc config to template 2024-12-29 18:48:12 +00:00
85c882043c ipsilon: Finish up openidc config 2024-12-29 17:42:29 +00:00
e3d702ecaf Update homeassistant 2024-12-29 17:22:46 +00:00
68965cd57f Add nodered to homeassistant hosts 2024-12-27 15:13:20 +00:00
47157118e7 telegraf: Move config into repository 2024-12-27 15:12:48 +00:00
eb1478abcb Inlucde secrets into mqtt playbook 2024-12-27 15:11:43 +00:00
7ee2572e04 mosquitto: Refactor mqtt infra 2024-12-27 15:10:40 +00:00
a8841252d1 Revert "syslogd: Don't run sync for every write in all.log"
This reverts commit 10f47b45e0.
2024-12-26 14:55:17 +00:00
ad5cf29b12 nodered: Don't report changes when finding subgid 2024-12-26 14:20:22 +00:00
fd0e1bc028 Reserve port for nodered container 2024-12-26 14:20:04 +00:00
2153bd8452 nodered: Fix nginx proxy config 2024-12-26 14:19:46 +00:00
22ef6bbc0a nodered: Initial version of role 2024-12-26 13:35:34 +00:00
a855e1fcaa Harmonize disk mount options 2024-12-25 08:32:26 +00:00
f886060227 base: Add hdparm to physical hosts 2024-12-25 08:09:35 +00:00
10f47b45e0 syslogd: Don't run sync for every write in all.log 2024-12-25 07:50:34 +00:00
a0f7145f9c Add DNS repo sync to adm hosts 2024-12-23 22:04:55 +00:00
e9372af0aa mosquitto: Allow shelly door/window writes 2024-12-23 20:10:30 +00:00
84daad7b79 mosquitto: Move acl files to repo 2024-12-23 10:10:48 +00:00
649cf7b22d telegraf: Allow telegraf to read hostkey 2024-12-23 09:59:36 +00:00
504cb33a94 frigate: Enable MQTT support 2024-12-23 09:48:15 +00:00
990d3ed176 frigate: More robust restart 2024-12-23 09:47:47 +00:00
aa4b46465c mosquitto: Configure TLS listener authorization 2024-12-23 09:47:01 +00:00
0adad8fa18 frigate: Temporary kludge to fix startup errors 2024-12-23 09:14:29 +00:00
0a861b0b8e mosquitto: Fix connections using TLS 2024-12-23 08:05:57 +00:00
632f34ec1a Add shell script linting tools to adm hosts 2024-12-23 07:40:34 +00:00
81252de145 homeassistant: Convert auth command to python 2024-12-22 18:22:19 +00:00
cfcdb4e935 thinlinc_server: Fixes for thinlinc 4.18 release 2024-12-21 18:57:44 +00:00
2dd0fb75c9 autofs: Mount volumes with noatime 2024-12-21 17:41:03 +00:00
ad85a0c46b ansible_host: Fix installing ansible patch 2024-12-21 16:41:18 +00:00
82a91857d0 ansible_host: Fix python dependencies for ansible 2024-12-20 18:06:45 +00:00
8dd1e61c3b ansible_host: Fix for python 3.12 clients 2024-12-20 18:06:14 +00:00
4756acbaf0 mosquitto: Fix warnings about config file perms 2024-12-20 17:39:10 +00:00
10d87f35d5 mosquitto: Use only TLSv3 2024-12-20 16:33:07 +00:00
9babcce554 Enable rsync backups 2024-12-17 22:32:57 +00:00
3efe44b50b rsync_backup: Initial version of role 2024-12-17 22:32:25 +00:00
46c41d2d77 ipsilon: Add OIDC key 2024-12-17 22:00:21 +00:00
1bab946019 ipsilon: Move db password to secrets 2024-12-17 21:57:26 +00:00
c534d83e04 Add roles mount to nms hosts 2024-12-17 20:27:52 +00:00
9fd303c4ad nfs_server: Move exports file under roles 2024-12-17 20:16:02 +00:00
112ad23a66 nfs_server: Move configs to include file 2024-12-17 20:15:20 +00:00
1e2e45551e autofs: Require TLS authentication for NFS mounts 2024-12-17 20:14:02 +00:00
d6e857fd84 nfs_client: Add support for RPC-with-TLS 2024-12-17 18:15:15 +00:00
121687ad7c tlshd: First version of role 2024-12-17 18:14:42 +00:00
9d6418ca71 Mount role directories to adm hosts 2024-12-17 15:56:30 +00:00
0cc512ca9a Allow server network hosts to use NFS with krb5 2024-12-17 15:54:46 +00:00
8f4cc59542 autofs: Add option which NFS mounts to enable 2024-12-17 15:53:31 +00:00
050eee3f23 base: More el7 cleanups mainly yum -> dnf 2024-12-17 15:46:56 +00:00
e51363ed8a kvm_host: Add LDAP client as dependency 2024-12-17 00:24:41 +00:00
e9752c560a kvm_host: Add script for checking orphaned vm data 2024-12-17 00:23:31 +00:00
70629e547e sshca: Remove unused signcert script 2024-12-16 23:50:28 +00:00
ba7086f3b1 sshd_cert: Use correct CA cert for signing 2024-12-16 23:42:08 +00:00
f4cc662c1a Update software subrepo 2024-12-16 23:17:32 +00:00
5f38645fee sshca: Add genkey.sh script 2024-12-16 23:10:14 +00:00
e630255364 sshca: Fix incorrect path 2024-12-16 23:09:52 +00:00
ab066a81b7 mongodb: Fix yamllint tests 2024-12-15 23:30:24 +00:00
6b24643f62 mariadb: Fix yaml lint errors 2024-12-15 23:28:44 +00:00
da76cec862 Fix install ordering 2024-12-15 22:36:45 +00:00
a64d1b0fa7 mariadb: Require TLSv3 connections 2024-12-15 21:40:55 +00:00
31473548e1 dovecot: Update TLS configurations 2024-12-15 21:36:12 +00:00
7089f38999 cups_server: Fix authentication and authorization 2024-12-15 21:24:28 +00:00
8a3e283c27 scanservjs: Allow service to connect host 2024-12-15 13:48:18 +00:00
2f6ca52acd Update gitea (security fix) 2024-12-13 09:40:36 +00:00
ac765ed6f2 Update gitea to latest version 2024-12-12 07:12:49 +00:00
e5e2604a68 docker: No need to set max user namespaces 2024-12-09 22:45:00 +00:00
2bf1320e3c ipsilon: Use default database names 2024-12-08 09:50:59 +00:00
856f5b286c docker_distribution Change service user uid/gid 2024-12-07 15:59:12 +00:00
381a7bd226 Remove old collab user 2024-12-07 15:57:29 +00:00
b1d5d2c7f2 collab: Change collab user uid/gid 2024-12-07 15:56:59 +00:00
4775bb8947 Use session persistence for webmail backends 2024-12-07 15:25:10 +00:00
6e72234b1d nginx_site: Add load balance method config option 2024-12-07 15:24:41 +00:00
11ddc0397a Increase oci-node memory and disk 2024-12-07 14:04:59 +00:00
0c06d1b651 Remove old mirror user 2024-12-07 11:49:04 +00:00
58c7f89448 Reserve port for ipsilon container 2024-12-07 11:48:13 +00:00
afdec531dd Revert "ipsilon: Reserve port for container"
This reverts commit 54775e72e9.
2024-12-07 11:47:54 +00:00
54775e72e9 ipsilon: Reserve port for container 2024-12-07 11:45:53 +00:00
215823b6b2 Add ipsilon vhost and related services 2024-12-07 11:45:17 +00:00
fb3608fa6e ipsilon: Initial version of role 2024-12-07 11:44:30 +00:00
0be436e8b0 mirror: Fix tabs to spaces 2024-12-06 10:15:14 +00:00
770d6a74d3 mirror: Refactoring sync-mirrors script 2024-12-06 10:10:46 +00:00
205b82f1d8 Update software versions 2024-12-04 17:13:03 +00:00
3b1c65ad82 Update software subrepo 2024-12-02 21:35:53 +00:00
72de1a5478 lm_sensors: Moved to ansible-software repo 2024-12-02 21:35:31 +00:00
fff2153a8a pf: Fix changed ip addresses 2024-12-01 17:10:57 +00:00
d11b2a17e3 rsyslog: Use FQDN when remote logging is used 2024-11-29 07:24:41 +00:00
b62ef00392 mirror: Update mirror user UID/GID 2024-11-28 13:18:04 +00:00
7e062a9592 Update ansible-software submodule 2024-11-27 15:23:08 +00:00
8c042d5ba8 ssh_known_hosts: Move under ansible-software repo 2024-11-27 15:18:44 +00:00
773dff1aa9 Update changed ip addresses 2024-11-26 13:03:33 +00:00
2c63423a9a Update gitea version 2024-11-26 07:57:21 +00:00
76c7a2a511 Update software versions 2024-11-15 18:00:53 +00:00
ff42297fad rocketchat: No alpine version of 7.0.0 and newer 2024-11-15 17:59:16 +00:00
2a4af75d53 mysqld_exporter: Restart service after update 2024-11-15 17:58:47 +00:00
4f408bac9d mongodb: Fix removing old backups 2024-10-21 05:17:12 +00:00
5865d0da5c frigate: Split data into two disks (hdd + nvme) 2024-10-19 18:24:34 +00:00
78319d29b5 frigate: Increase shm size 2024-10-19 18:24:16 +00:00
0a0d966d08 certbot: Change certbot user UID/GID 2024-10-19 17:09:14 +00:00
b16dcb8329 nginx_site: Fix certbot proxy 2024-10-19 17:08:09 +00:00
b0ca80f4c2 Update homeassistant electorlux status plugin 2024-10-14 22:10:02 +00:00
68114937c6 Update software versions 2024-10-13 15:27:34 +00:00
04be788c09 Add more memory to frigate hosts 2024-10-12 20:23:41 +00:00
4eddc7498c Remove ssd storage from vmhost01 2024-10-12 20:19:55 +00:00
e617040bfd Fix dhcp client configs for OpenBSD 7.6 2024-10-12 19:43:37 +00:00
4b27e6c316 ifstated: Fix dna-gw config for OpenBSD 7.6 2024-10-12 19:42:38 +00:00
aaeae7002a Add ssh public host keys to vmhosts 2024-10-12 18:57:26 +00:00
58bde398c0 unbound: Use Google as external resolver 2024-10-12 18:09:09 +00:00
13840dd12a dhcpd: Fix leases file for OpenBSD 7.6 2024-10-12 17:02:49 +00:00
b5224f7733 Add ipv6 address to gateway hosts 2024-10-12 16:46:22 +00:00
e9c9f0a47c Add iot interface to homeassistant hosts 2024-10-12 15:20:19 +00:00
119ecd3e0a Spinning disks only on vmhost02 2024-10-12 15:19:48 +00:00
84f8549145 Fix python install for OpenBSD 2024-10-11 15:37:00 +00:00
8cef5964ba Update OpenBSD installs to 7.6 2024-10-11 15:24:54 +00:00
f8cbdb29a1 Update changed dynamic ip addresses 2024-10-08 19:09:03 +00:00
bd8ae569f2 Remove nordpool plugin from homeassistant 2024-09-28 15:03:01 +00:00
7643d02c5e homeassistant: Enable ha user lingering 2024-09-28 15:02:42 +00:00
c4db933785 node_exporter: Fix model name for nvme disks 2024-09-11 07:36:47 +00:00
264594636f frigate: Update to 0.14.1 version 2024-09-10 20:10:13 +00:00
884e276aae Update software versions 2024-09-09 19:49:15 +00:00
78485bc490 Change OpenBSD mirror source 2024-08-27 15:56:52 +00:00
d747f3a150 thinlinc_mirror: Print changelog after download 2024-07-11 07:40:44 +00:00
7ac216baf8 Update software versions 2024-07-09 20:35:13 +00:00
c7606378f2 nginx: Fix certbot proxy config 2024-06-28 15:22:49 +00:00
8ad160b046 nginx_site: Fix certbot virtual host 2024-06-28 15:22:17 +00:00
ed5bc5028b collab: Disable sftp backups 2024-06-28 14:30:49 +00:00
be4f2cfce5 Update rocketchat 2024-06-28 14:30:25 +00:00
991a129f28 Move prometheus host to vmhost01 2024-06-26 15:45:41 +00:00
a92d72034e Move mirror host to vmhost02 2024-06-26 14:55:28 +00:00
9982ee4386 frigate: Enable user lingering 2024-06-25 16:56:46 +00:00
acf2853223 frigate: Don't store plaintext passwords in config 2024-06-25 16:13:35 +00:00
13e602a76d Update software submodule 2024-06-24 15:37:16 +00:00
71c5229adb Re-organize disks for nas hosts 2024-06-23 18:13:42 +00:00
de94e75549 sftpuser: Remove unused role 2024-06-22 19:32:50 +00:00
c9e8ec6d7c mongodb: Remove unused config 2024-06-22 19:32:05 +00:00
3127ddf841 Disable sftp backups from collab hosts 2024-06-22 19:30:33 +00:00
e60c786b76 ldap_server: Migrate to use backup_base 2024-06-22 19:25:22 +00:00
849b4ab887 mariadb: Migrate to use backup_base 2024-06-22 19:25:04 +00:00
b692084f16 Add mongodb hosts to sftp backups 2024-06-22 19:11:36 +00:00
1534104bf4 Migrate from backup_server to backup_base 2024-06-22 19:10:42 +00:00
db996daf14 rclone: Migrate to use backup_base role 2024-06-22 19:10:18 +00:00
5e5ebf937c backup_base: More restrictive permissions 2024-06-22 19:09:43 +00:00
788c9fa453 backup_base: Add sftp ssh config when needed 2024-06-22 19:09:20 +00:00
e233860b7b mongodb: Add database backups 2024-06-22 18:51:49 +00:00
195d9c3b03 backup_base: Rename role 2024-06-22 18:11:04 +00:00
6dd5cfa681 mariadb: Style fixes and store 30 days of backups 2024-06-21 15:20:02 +00:00
0eeed22092 ldap_server: Style fixes for backup script 2024-06-21 15:17:39 +00:00
750b3bab7d ldap_server: Store backups for 30 days 2024-06-21 15:14:44 +00:00
8ef5f5b18e Rotate dkim keys 2024-06-18 16:38:45 +00:00
813146b106 minecraft: Change uid and gid 2024-06-16 20:48:31 +00:00
023257ae55 Remove unneeded option 2024-06-15 20:59:01 +00:00
66c25d20b8 nginx_site: Disable support for custom tls config 2024-06-15 20:57:58 +00:00
1b9b9962a7 base: Set LC_TIME correctly to get 24h clock 2024-06-12 13:27:49 +00:00
c08a8158f7 Update software versions 2024-06-11 16:48:25 +00:00
9f69d421f2 frigate: Store events for 1 month 2024-06-06 19:31:40 +00:00
20d91ff1b0 Add blackbox_exporter to external ns host 2024-06-06 19:30:05 +00:00
dc2a6f5788 blackbox_exporter: Initial version of role 2024-06-06 19:29:38 +00:00
bb8b486263 Increase os disk size for oci-nodes 2024-05-18 19:54:43 +00:00
2d7113f6e6 Update software versions 2024-05-18 19:29:41 +00:00
5fd1b776be rclone: Disable checksumming 2024-05-11 19:27:13 +00:00
62463860e4 rclone: Fix extra spaces 2024-05-11 19:17:23 +00:00
eb4a2fa842 Open port 80 from adm hosts for certbot 2024-05-11 19:13:29 +00:00
ce72d0d17a nginx_site: Fix certbot virtual host 2024-05-11 19:13:04 +00:00
d0f8144753 Convert mail hosts to Rocky Linux 9 2024-05-11 19:03:14 +00:00
96f28d63cc grossd: Fix install on EL9 2024-05-11 19:01:37 +00:00
a2fe24955b nginx_site: Use plain http for certbot 2024-05-11 19:01:13 +00:00
a25cd83e94 Revert "nginx: Fix crash on el9 with plain text http"
This reverts commit da371980aa.
2024-05-11 19:00:51 +00:00
e20873cbd3 network: Set netmask in correct format 2024-05-11 17:29:29 +00:00
f4b34de6c4 Continue el9 upgrades 2024-05-11 09:03:22 +00:00
da371980aa nginx: Fix crash on el9 with plain text http 2024-05-10 16:22:42 +00:00
c06d3cdc7e nginx: Fix typo 2024-05-10 16:14:33 +00:00
91f1fe3fbc Don't enable plain text web server on nms hosts 2024-05-10 15:15:41 +00:00
2a750a57f3 nginx_site: Add support for disabling plain text 2024-05-10 15:14:53 +00:00
42fddcc278 nginx: Enable nginx 1.24 module for EL9 2024-05-10 15:12:03 +00:00
e35f425d07 Update bunch of hosts to rocky linux 9 2024-05-10 01:46:28 +00:00
8aa7a8aaa2 network: Fix setting DNS server priorities 2024-05-10 01:08:04 +00:00
2ac7370613 network: Fix empty nameserver list 2024-05-10 00:25:24 +00:00
7c7b632fc8 network: Add missing template 2024-05-10 00:17:50 +00:00
ce46c5fb90 Remove sshscan and sslscan from nms hosts 2024-05-09 20:08:34 +00:00
eb1b324c8d network: Add support for NetworkManager 2024-05-09 19:42:35 +00:00
fd495036f2 unbound: Don't hardcode zones 2024-05-09 18:42:42 +00:00
3b2c2a453e unbound: Add support for copying zone files 2024-05-09 18:23:21 +00:00
2329b5d5e6 Increase memory for log hosts 2024-05-09 18:22:06 +00:00
cdbd70ec1d Update homeassistant 2024-05-09 15:52:59 +00:00
8c93ba043d Drop aarch64 architecture from epel mirror 2024-04-25 05:19:19 +00:00
885c01ebaa mongodb: Limit max connections to database 2024-04-23 15:30:22 +00:00
b2da9de4d6 syslogd: Fix local logging on servers 2024-04-23 07:19:30 +00:00
191e322e9e Remove tftp daemon from nms hosts 2024-04-20 15:18:30 +00:00
d7527a8a6f rclone: Fix config directory permissions 2024-04-18 09:27:01 +00:00
518e522a50 Update gitea to latest version 2024-04-16 07:15:42 +00:00
80b7a7c97f google_spell_pspell: Initial version of role 2024-04-13 20:20:58 +00:00
f08c478bf6 Run roundcube on all oci-node instances 2024-04-13 18:47:40 +00:00
a275cadcbd roundcube: Store uploads to databse 2024-04-13 18:43:56 +00:00
4ae88c17a0 dhcpd: Hotfix broken ISC DHCPd for OpenBSD 2024-04-09 19:52:36 +00:00
9309a901e3 Monthly software updates 2024-04-09 19:51:56 +00:00
f512d8e83e rclone: Include ssh_known_hosts role 2024-04-07 18:15:33 +00:00
8cd80becd7 rclone: Don't randomize cron job start time 2024-04-07 18:06:06 +00:00
5ba21ae4bf sftpuser: Set default chroot path 2024-04-07 18:02:14 +00:00
29c989711c sftpuser: Prefix variables correctly 2024-04-07 17:57:05 +00:00
9cb17a88c7 rclone: Hardcode hostgroup for sftp backups 2024-04-07 17:42:57 +00:00
8ef3592786 sftpuser: Hardcode username 2024-04-07 17:38:03 +00:00
567691c3c4 rclone: Use hardcoded user on remote host 2024-04-07 17:37:46 +00:00
d050c5c723 sftpbackup: Remove wrapper role 2024-04-07 17:36:56 +00:00
4d127f05e7 Don't include backup ssh key in git 2024-04-07 17:24:06 +00:00
646aada779 sftpuser: Read ssh key from correct place 2024-04-07 17:22:58 +00:00
0a724359dc rclone: Add ssh key generation and run as backup 2024-04-07 17:21:41 +00:00
5dc08701b2 backup_server: Allow backup user to write 2024-04-07 16:31:06 +00:00
f3293d4b05 rclone: Don't use template for backup script 2024-04-07 16:15:38 +00:00
cd8e979ded Add github backups 2024-04-07 14:35:26 +00:00
febee5c72e backup_github: New role 2024-04-07 14:35:04 +00:00
5cd6edc1b1 Update to OpenBSD 7.5 2024-04-07 14:09:24 +00:00
8752c36391 backup_server: Move data to new UID/GID 2024-04-07 14:09:00 +00:00
1a3e1dbeeb Add bitbucket backups 2024-04-07 13:43:07 +00:00
1520f8dabf backup_server: Move bitbucket backup to own role 2024-04-07 13:42:32 +00:00
0d72e9e920 backup_bitbucket: New role 2024-04-07 13:38:21 +00:00
7496125098 routeros_firmware: Show changelog after download 2024-04-06 18:30:53 +00:00
e2fb492195 routeros_firmware: Fix download for new html 2024-04-06 18:27:35 +00:00
e57cd06891 nginx_site: Add security headers for movies.foo.sh 2024-04-02 18:01:02 +00:00
583b106d39 nginx_site: Add more strict headers to collab 2024-04-02 16:47:49 +00:00
50f02e85ac routeros_firmware: Give error if checksum fetch fails 2024-03-30 13:55:20 +00:00
604ae20554 mongodb: Lint fixes 2024-03-24 19:24:28 +00:00
6d3b1e1538 tests: Use new naming for tests
0*.sh - Tests for ansible yaml files
1*.sh - Tests for shell scripts
2024-03-24 19:04:41 +00:00
433a9114df mysql_exporter: Lint fixes 2024-03-24 18:58:52 +00:00
5aa57c8358 snmp_exporter: Lint fixes 2024-03-24 18:56:19 +00:00
ea8db3ab6b nginx_exporter: Lint fixes 2024-03-24 18:52:31 +00:00
d8cf025fbe sshd_cert: Fix lint errors 2024-03-24 18:23:46 +00:00
315d89c750 Add ssh host aliases for shell and dna-gw hosts 2024-03-24 11:55:27 +00:00
5f4f8e35aa sshd_cert: Fix checking certificate status 2024-03-24 11:55:08 +00:00
61e8ebdd20 sshd_cert: Sign if pubkey is newer than cert 2024-03-23 21:33:13 +00:00
55aed1a36d sshd_cert: Add support for aliases in certificate 2024-03-23 20:29:53 +00:00
365d0af6a6 Add global ssh_known_hosts to adm hosts 2024-03-23 19:54:57 +00:00
b1c3597fa9 ssh_known_hosts: Use ssh certificate authority 2024-03-23 19:51:32 +00:00
7ce6d58923 sshd_cert: First version of role 2024-03-23 19:18:30 +00:00
df2573a650 sshd: Fix crypto configs for el8 systems 2024-03-23 18:28:23 +00:00
917674bac8 sshca: First version of role 2024-03-23 18:19:00 +00:00
0618cde4d1 mysqld_exporter: Don't hardcode prometheus servers 2024-03-20 20:48:07 +00:00
122e27518b snmp_exporter: Don't hardcode prometheus servers 2024-03-20 20:47:41 +00:00
7f5a66e6c8 nginx_exporter: Remove unused test lines 2024-03-20 20:45:56 +00:00
a7432b2208 Add nginx_exporter to prometheus servers 2024-03-20 20:44:43 +00:00
6e4cbe8b40 nginx_exporter: Remove empty line 2024-03-20 20:44:04 +00:00
92ca4fcba4 nginx_exporter First version of role 2024-03-20 20:32:14 +00:00
1952f5f96e rocketchat: First version of role 2024-03-16 18:00:27 +00:00
1f10474860 mongosh: Use startup params and enable replset 2024-03-16 16:13:56 +00:00
7489a0c895 homeassistant: Move container to different port 2024-03-15 17:16:16 +00:00
8df5271acc mongodb: Fix mongo client cmd for mongo 6.0 2024-03-15 15:58:23 +00:00
eba736f107 Convert user.list to markdown 2024-03-15 15:38:00 +00:00
8465cf1d8b Try to fix table formatting again 2024-03-15 15:33:09 +00:00
6e58bc2a60 Reformat table 2024-03-15 15:30:26 +00:00
cd1f83bb68 Add list of reserved ports by containers 2024-03-15 15:27:57 +00:00
7ba39e01c7 Remove unnecessary comments 2024-03-13 21:25:55 +00:00
cbe78a3bd0 frigate: Fix lint errors 2024-03-13 21:24:21 +00:00
6bef2b0165 routeros_firmware: Fix lint errors 2024-03-13 21:18:09 +00:00
ead2775c41 shelly_firmware: Fix lint errors 2024-03-13 21:16:29 +00:00
a3de09e2f2 mongodb: Don't hardcode os release version 2024-03-13 21:10:36 +00:00
525565073b mongodb: Fix running role in check mode 2024-03-13 21:00:17 +00:00
b229c17718 pki: Store local CA hash even in check mode 2024-03-13 20:17:31 +00:00
cb39610019 ldap_server: Fix running role in check mode 2024-03-13 20:17:19 +00:00
7229b6bad7 pki: Fix running ansible with check option 2024-03-13 19:51:35 +00:00
0a00748732 Update software subrepo 2024-03-13 19:33:40 +00:00
dfe1ea7db3 Set scanservjs version 2024-03-13 19:33:26 +00:00
ec3b486e7c collab: Fix extra newline from graphviz repo conf 2024-03-13 18:46:40 +00:00
7c9727c6a6 sendmail: Add automatic ca certificate updates 2024-03-12 18:41:50 +00:00
778f8e99d7 Update softwrae versions 2024-03-12 18:39:38 +00:00
3288f9ec58 routeros_firmware: Fix parsing mikrotik web page 2024-03-07 07:17:17 +00:00
427fbd9fc4 Add mta-sts.foo.sh virtual host 2024-03-04 15:34:58 +00:00
a81b15edcd Enable opendkim for mail servers 2024-03-02 19:01:12 +00:00
55a9a77e71 sendmail: Add opendkim filter 2024-03-02 19:00:59 +00:00
546f091e91 opendkim: Initial version of role 2024-03-02 19:00:44 +00:00
6c661f75b8 nsd: Validate zone files during copy 2024-03-01 18:38:01 +00:00
8a4b96d06d sendmail: Fix EHLO message address 2024-03-01 12:32:53 +00:00
171aa216d6 mariadb: Add missing logrotate file 2024-02-23 05:53:34 +00:00
a632b3efbf mariadb: Add query log rotation 2024-02-23 05:53:10 +00:00
04575b20ee Update gitea to 1.21.6 2024-02-23 05:52:17 +00:00
f427936708 Update software versions 2024-02-18 19:30:32 +00:00
fc5d157916 Use new repo for homeassistant electrolux 2024-02-18 19:00:30 +00:00
1f3e76e4f6 Enable mysqld_exporter for prometheus hosts 2024-02-17 17:59:16 +00:00
8bc5793d70 mysqld_exporter: Initial version of role 2024-02-17 17:58:32 +00:00
5751c77b8f mariadb: Enable query log 2024-02-17 17:21:29 +00:00
31c8b7aa6a node_exporter: Add physical host disk monitoring 2024-02-16 12:02:57 +00:00
e39fc8c992 base: Install fwupd on physical linux hosts 2024-02-16 07:58:41 +00:00
641e66237e Add some scanning/testing tools to adm hosts 2024-02-16 07:58:18 +00:00
e21e372dc4 fwupd: First version of role 2024-02-16 07:57:59 +00:00
caf6b54774 dovecot: Require TLS 1.3 2024-02-14 21:03:35 +00:00
bf8c5532cb Fix usb device ports for homeassistant host 2024-02-14 18:47:44 +00:00
58a90d692b grafana: Force ipv4 connection from proxy 2024-02-14 18:47:19 +00:00
1e55576ba3 Fix typo 2024-02-14 17:40:43 +00:00
7f7532ccde homeassistant: Reload udev rules after change 2024-02-13 21:20:31 +00:00
f141ca0af9 Disable syncing logs for now 2024-02-13 20:03:54 +00:00
1ff4842775 friage: Store recordings for 7 days 2024-02-13 20:03:35 +00:00
8136e10758 prometheus: Add snmp exporter
Mostly hardcoded for now
2024-02-13 20:02:59 +00:00
09b2156d78 Fix Coral USB port 2024-02-13 20:02:30 +00:00
bf10bc5c6c shelly_firmware: Initial version of role 2024-02-13 20:02:01 +00:00
31d00d0b9d kvm_host: Move os disks to dedicated disk 2024-02-13 20:01:25 +00:00
cdc505274d zoneminder: Remove deprecated role 2024-02-13 16:38:28 +00:00
4e5fb25a7a Exclude unused architectures from epel mirror 2024-02-11 16:28:55 +00:00
d88de75b88 Set snmp_exporter version 2024-02-10 21:57:55 +00:00
c826d36d0d Add snmp_exporter to nms hosts 2024-02-10 21:57:36 +00:00
8a7159c0c4 snmp_exporter: Initial version of role 2024-02-10 21:55:24 +00:00
47ee78221f node_exporter: Remove allowed sans option
Some of our node_exporter versions are too old and don't support allowed
sans option.
2024-02-10 19:21:05 +00:00
11c8da0558 node_exporter: More restrictive tls configuration 2024-02-10 18:59:48 +00:00
2eb65f713f routeros_firmware: Initial version of role 2024-02-10 17:34:31 +00:00
c91568cd7e frigate: Fix using Coral devices for detection 2024-02-09 16:38:34 +00:00
470010aa0a udev: Add dummy role to support reloading rules 2024-02-09 16:37:38 +00:00
e1604ce193 frigate: Add USB Coral detector 2024-02-09 12:12:01 +00:00
8242f11125 Sync site.yml 2024-02-04 17:09:07 +00:00
04ff09e3bf pf: Fix changed ip address 2024-02-04 17:08:23 +00:00
2da1995a73 Remove zm web site and add cctv 2024-02-04 17:07:55 +00:00
7a3a385eb5 Add frigate host 2024-02-04 17:07:19 +00:00
a0bee46545 Remove zm hosts 2024-02-04 17:05:16 +00:00
cb7ca70d16 frigate: Initial version of role 2024-02-04 17:03:29 +00:00
cb0d0a949d Update gitea 2024-02-01 20:08:46 +00:00
93128bb624 Update gitea 2024-01-25 20:43:25 +00:00
3bcc12a16d Update homeassistant custom plugins 2024-01-25 20:41:59 +00:00
5a8fca650c node_exporter: Force path to textfile collectors
Cron ismissing sbin directories by default and /usr/local on OpenBSD so
force them into path.
2024-01-25 19:33:17 +00:00
cdd7e82b6a Move DNA interface to correct rdomain on fsol-gw 2024-01-25 19:32:28 +00:00
69ebc89858 openvpn: Hardcode rdomain for now 2024-01-25 19:31:06 +00:00
7a02a28d0f network: Add support for OpenBSD rdomains 2024-01-25 19:28:26 +00:00
adbc274797 homeassistant: More robust auth command 2024-01-17 20:41:53 +00:00
5900c39b59 yamllint fix 2024-01-17 20:30:56 +00:00
d22236f5df scanservjs: yamllint fix 2024-01-17 20:30:13 +00:00
e5d0752812 node_exporter: Run textfile collectors every 10min 2024-01-17 20:27:11 +00:00
c98c7fd7bb node_exporter: Use documented syntax for options 2024-01-17 18:53:36 +00:00
98d52e577a node_exporter: Enable text collector for OpenBSD 2024-01-17 18:35:00 +00:00
e43dd2a26e Fix changed ip addressses 2024-01-09 23:24:26 +00:00
2247ce1d16 Update softwrae versions 2024-01-09 19:15:54 +00:00
23d8b9bcdc pki: Fix group from OpenBSD private dir 2023-12-22 18:06:18 +00:00
89a0cbddbf Update gitea 2023-12-22 16:05:33 +00:00
eead221046 Update homeassistant to 2023.12.3 2023-12-15 15:23:57 +00:00
b04edceb13 homeassistant: Fix updating to new version 2023-12-15 15:23:32 +00:00
79ecf7277f Update software versions 2023-12-12 21:34:26 +00:00
2b475bf8ce Remove mythtv hosts 2023-12-12 21:18:25 +00:00
c7c77fcb0b Fix typo 2023-12-08 18:08:34 +00:00
a4bbc54380 Increase memory on sql hosts 2023-12-08 18:07:44 +00:00
e00ce3cb1c Add zigbee device to homeassistant 2023-12-08 18:07:14 +00:00
a4660f69cf homeassistant: Add support for zigbee dongle 2023-12-05 17:15:16 +00:00
8c66c9a6a0 Update gitea to 1.21.1 2023-11-27 10:43:00 +00:00
ad187f51e3 php4dvd: Use TLS for MariaDB connections 2023-11-26 17:41:18 +00:00
270da668c3 pki: Prevent OpenBSD from changing permissions 2023-11-26 15:35:51 +00:00
3fdbd62aca scanserv: Enable user lingering 2023-11-26 15:25:00 +00:00
ee6d3b4d52 scanservjs: Fix sane host address 2023-11-26 15:22:54 +00:00
4594bb6083 Update Fedora to 39 2023-11-25 18:15:53 +00:00
0ed96a14f5 nginx_site: Serve static files from static02 2023-11-25 17:35:34 +00:00
7cf2ad1f5a Fix memory size for oci-nodes 2023-11-25 17:11:40 +00:00
023af1ae91 Update oci-nodes to Rocky 9 2023-11-25 17:11:19 +00:00
0eff4dd804 Update OpenBSD to 7.4 2023-11-24 17:11:25 +00:00
5026dddb1e Add norpool plugin to homeassistant 2023-11-21 09:26:06 +00:00
84e42378b5 mongodb: Update to version 6.0 2023-11-19 15:17:09 +00:00
7928d5fdb3 Update software components 2023-11-15 16:52:15 +00:00
5244f36adb prometheus: Add prometheus itself to monitoring 2023-11-12 20:44:50 +00:00
42d604a921 nginx: Expose status page 2023-11-12 15:53:15 +00:00
624ad96c8a Use different mirror for OpenBSD 2023-11-05 18:10:21 +00:00
f6e2e4fe24 No need to set prometheus version 2023-11-04 20:36:46 +00:00
929738af88 prometheus: Use os packaged prometheus 2023-11-04 20:36:10 +00:00
7ee84bffd9 Add scan.foo.sh endpoint to proxies 2023-11-04 19:42:39 +00:00
ae27f5cc67 Add sane hosts 2023-11-04 19:42:11 +00:00
94dc909bd9 scanservjs: Initial version of role 2023-11-04 19:39:42 +00:00
f0656502af sane: Intial version of role 2023-11-04 19:39:30 +00:00
8e9a7fd4fc podman: Don't force use nginx as frontend 2023-11-01 17:22:26 +00:00
c2603ef8d8 nginx_site: Allow uploading larger files to collab 2023-10-28 15:46:02 +00:00
6e2fd35622 Fix adding tape drive to backup02.home.foo.sh 2023-10-25 16:22:17 +00:00
03def639d5 sendmail: Lint fixes for command execution 2023-10-15 16:31:15 +00:00
c8afd02fb2 sssd: Use command instead of shell 2023-10-15 16:27:12 +00:00
fa469574b7 certbot: Fix variable name 2023-10-15 15:27:28 +00:00
8b2696de1a reportmirror: Fix variable names from defaults 2023-10-14 16:11:59 +00:00
affcf7f572 Rename mirror/thinlinc to thinlinc_mirror 2023-10-14 16:09:11 +00:00
b7a3415352 Rename mirror/reportmirror to reportmirror 2023-10-14 16:06:27 +00:00
e2c59bc220 keytab: Prefix variable names with keytab_ 2023-10-14 16:01:08 +00:00
4fb04065f9 nginx: Rename nginx/server to nginx 2023-10-14 15:48:51 +00:00
2119f96382 nginx_site: Prefix all variables with role name 2023-10-13 17:14:14 +00:00
15c612cb3b Rename nginx/server to nginx_server 2023-10-13 16:17:07 +00:00
39fad6ed05 homeassistant: Style fixes 2023-10-13 12:48:04 +00:00
317622a01d Fix Forbidden implicit octal value from playbooks 2023-10-13 12:44:42 +00:00
644fcbe638 Update software versions 2023-10-13 12:37:46 +00:00
86d076ebc6 Fix "Forbidden implicit octal value" lint errors 2023-10-12 19:14:54 +00:00
1e973b3dde gitea_runner: Update config to latest version 2023-10-12 18:41:57 +00:00
86a7b60b46 cups_server: Lint fixes 2023-10-12 18:40:02 +00:00
5f170a6caf mirror: Lint fixes 2023-10-12 18:36:43 +00:00
70cdfd4612 mirror: Lint fixes 2023-10-12 18:32:40 +00:00
ee25d32b60 relayd: Lint fixes 2023-10-12 18:09:44 +00:00
ee2f2154be spamassassin: Lint fixes 2023-10-12 18:08:59 +00:00
ae000b791b mosquitto: Lint fixes 2023-10-12 18:08:07 +00:00
e7f363cda5 websockify: Lint fixes 2023-10-12 18:06:57 +00:00
77df67fd66 gitea: Linting and use .bashrc instead of .profile 2023-10-12 18:04:49 +00:00
baab3192b0 prometheus: Make version configurable 2023-10-12 17:56:44 +00:00
04e140c8d5 php4dvd: lint fixes 2023-10-12 16:33:52 +00:00
eb90c60317 Update gitea_runner 2023-10-11 20:37:21 +00:00
d7b9f69dd0 Update software versions 2023-10-11 20:28:42 +00:00
0db76e1481 nginx/server: Update nginx to 1.22 on rhel hosts 2023-10-10 18:47:13 +00:00
42f725d6f8 authcheck: Keep container up to date 2023-10-08 16:09:31 +00:00
c653ac3f2f kdc: Keep container up to date 2023-10-08 16:06:42 +00:00
a92546e667 php4dvd: Install updates when available 2023-10-08 16:02:27 +00:00
9770232f66 thinlinc_server: Changes to support version 4.15.0 2023-09-19 06:27:25 +00:00
b2339cd877 mirror/thinlinc: Fix updating server packages 2023-09-18 16:09:08 +00:00
f701cfd4c9 ansible_host: Remove python 3.11 netaddr kludge 2023-09-16 19:18:09 +00:00
c077b5a41a node_exporter: Fix service name from restart 2023-09-12 22:16:36 +00:00
0d621444c9 nginx/site: Move static data to static01 2023-09-12 22:16:15 +00:00
3a39e40710 Increase memory size on mail hosts 2023-09-12 16:36:35 +00:00
a231ea1ece mirror/base: Send cron mails to root 2023-08-28 19:42:21 +00:00
31152b904a mirror/thinlinc: Fix deploying sync script 2023-08-26 16:29:18 +00:00
a78ac15a72 mirror/thinlinc: Remove debug print 2023-08-26 16:28:13 +00:00
7f3bb95d2f mirror/thinlinc: Refactor download script 2023-08-26 16:26:11 +00:00
b6754d49e7 Reserve uid/gid for prometheus 2023-08-20 14:37:21 +00:00
61e057a7e9 Add data disk to oci-node01 2023-08-20 14:35:42 +00:00
5fc2d161ad Add php4dvd to oci-node01 and create local storage 2023-08-20 14:35:00 +00:00
31b38dfc2f Add movies.foo.sh to proxy servers 2023-08-20 14:34:33 +00:00
f664e0271b php4dvd: Initial version of role 2023-08-20 14:34:11 +00:00
946c7d0772 Add node_exporter to all hosts 2023-08-20 14:33:39 +00:00
5ec34f54c8 node_exporter: Add missing files 2023-08-20 14:32:43 +00:00
9025755695 node_exporter: Add OpenBSD support 2023-08-20 14:32:15 +00:00
3d0cf42e8e Remove obsolete ports from proxy pf config 2023-08-20 14:06:40 +00:00
7516f5813e prometheus: Fix node configs 2023-08-19 18:21:43 +00:00
d7edba1a0f No use for port 443 on ldap hosts 2023-08-19 17:48:43 +00:00
1fdce68b75 node_exporter: Fix installing for Fedora 2023-08-19 17:46:44 +00:00
f831973023 Add prometheus playbook to master playbook 2023-08-19 17:31:02 +00:00
20fb7aeacf Add prometheus hosts 2023-08-19 17:29:54 +00:00
9b1aa236c5 prometheus: First version of role 2023-08-19 17:29:00 +00:00
051acc86cc node_exporter: First version of role 2023-08-19 17:28:30 +00:00
f573704b34 Move data disks to nvme storage 2023-08-19 13:55:29 +00:00
112d900b8f base: Add cpupower to physical hosts 2023-08-14 17:17:25 +00:00
45c124a82b cpupower: Initial version of role 2023-08-14 17:15:28 +00:00
4846fc9bf5 Update software versions 2023-08-14 17:04:33 +00:00
4a09185aeb nginx/site: Fix upstream hostname 2023-08-10 13:46:38 +00:00
08fbb13640 nginx: Add more proxy headers 2023-08-09 22:33:10 +00:00
07125310bd Update gitea to 1.20.2 2023-07-29 18:03:03 +00:00
6b2e64df91 Fix typo 2023-07-25 16:15:01 +00:00
9c44999682 mariadb: Add timezone information to database 2023-07-23 17:12:41 +00:00
4ef795d02e Update gitea to version 1.20.1 2023-07-22 17:38:11 +00:00
be04450c81 Add Electrolux integration to homeassistant 2023-07-22 16:30:33 +00:00
8b75d26eb8 homeassistant: Add support for custom integrations 2023-07-22 16:29:36 +00:00
69411beca5 gitea: Increase limit for http request body size 2023-07-21 17:07:13 +00:00
7c921cf76b Update ansible-software subrepo 2023-07-21 10:35:57 +00:00
c0e00b7b08 Update ansible-software subrepo 2023-07-21 10:01:21 +00:00
e683b138b3 Move BT USB adapter to different port 2023-07-21 08:52:02 +00:00
444 changed files with 16479 additions and 2109 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
.*.swp
__pycache__
files/ssh/backup.pub

16
container-ports.md Normal file
View 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 |

View file

@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKdaNO9dLpI8CVx1rwGsKN45Pgiz+Btrlf2Q/nXCx4Ru root@backup02.home.foo.sh

View file

@ -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

View file

@ -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

View file

@ -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]}

View file

@ -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]}

View file

@ -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]}

View file

@ -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

View file

@ -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
View 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]}

View file

@ -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"

View file

@ -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

View file

@ -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
View file

@ -0,0 +1,5 @@
---
network_dns_servers:
- 172.20.20.10
- 172.20.20.11
- 172.20.20.12

View file

@ -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]}

View file

@ -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]}

View file

@ -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]}

View file

@ -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}

View file

@ -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

View file

@ -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]}

View file

@ -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]}

View file

@ -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]}

View file

@ -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]}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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]}

View file

@ -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

View file

@ -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

View 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]}

View file

@ -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]}

View file

@ -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
View 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]}

View file

@ -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

View file

@ -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]}

View file

@ -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

View file

@ -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]}

View file

@ -0,0 +1,6 @@
---
vmhost: vmhost02.home.foo.sh
network_interfaces:
- device: eth0
vlan: 20
mac: "52:54:00:ac:dc:48"

View file

@ -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"

View file

@ -10,3 +10,5 @@ network_interfaces:
- device: vio1
vlan: 103
proto: none
vip11_priority: 240
vip12_priority: 120

View file

@ -10,3 +10,5 @@ network_interfaces:
- device: vio1
vlan: 103
proto: none
vip11_priority: 120
vip12_priority: 240

View file

@ -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

View file

@ -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

View file

@ -15,6 +15,7 @@ network_interfaces:
- device: vio2
vlan: 103
proto: dhcp
rdomain: 1
- device: vio3
vlan: 102
proto: none

View file

@ -15,6 +15,7 @@ network_interfaces:
- device: vio2
vlan: 103
proto: dhcp
rdomain: 1
- device: vio3
vlan: 102
proto: none

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -17,4 +17,4 @@ network_interfaces:
netmask: 255.255.255.248
proto: static
vip25_priority: 0
vip25_priority: 1

View file

@ -1,5 +1,7 @@
---
vmhost: vmhost01.home.foo.sh
datadisks:
- {size: 10, type: nvme}
network_interfaces:
- device: eth0
vlan: 20

View file

@ -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"

View 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

View file

@ -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:

View file

@ -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
View 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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 }}"

View file

@ -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

View file

@ -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

View file

@ -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 \

View file

@ -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

View file

@ -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

View file

@ -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

View 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"

View file

@ -15,7 +15,7 @@
name: /export
src: LABEL=/export
fstype: xfs
opts: noatime
opts: noatime,noexec,nosuid,nodev
passno: "0"
dump: "0"
state: mounted

View file

@ -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/*"

View file

@ -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

View file

@ -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"

View file

@ -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 }}"

View file

@ -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'"

View file

@ -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

View file

@ -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
View 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

View file

@ -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

View file

@ -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
View 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

View file

@ -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 }}"

View file

@ -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

View file

@ -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

View 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,

View file

@ -2,4 +2,4 @@
dependencies:
- {role: epel_repo}
- {role: git}
- {role: nginx/server}
- {role: nginx}

View file

@ -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"

View file

@ -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

File diff suppressed because it is too large Load diff

View 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

View file

@ -0,0 +1,3 @@
---
dependencies:
- {role: ldap}

View 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"

View file

@ -0,0 +1,4 @@
METADATA_PATH=/srv/audiobookshelf/metadata
CONFIG_PATH=/srv/audiobookshelf/config
PORT=13378
HOST=127.0.0.1

View 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"
```

View file

@ -0,0 +1,5 @@
---
- name: Restart audiobookshelf
ansible.builtin.service:
name: audiobookshelf
state: restarted

View file

@ -0,0 +1,3 @@
---
dependencies:
- {role: nginx}

View 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

View file

@ -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

View file

@ -0,0 +1,3 @@
---
autofs_home: true
autofs_roles: true

View file

@ -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