7 Commits

Author SHA1 Message Date
René Mewißen
6994cc6000 inputs.docker does not support perdevice and total 2025-12-10 10:31:59 +01:00
789eeeb8c9 paths removed from backup 2025-12-09 16:43:47 +01:00
7c359f2070 new path 2025-12-08 11:25:11 +01:00
2365f3644c changed path 2025-12-03 09:51:34 +01:00
b170189008 new hosts 2025-12-02 12:02:53 +01:00
158b836626 new host 2025-12-02 11:56:47 +01:00
2aa5146af2 disabled installation because cimmunity package not available at this stage 2025-12-01 11:18:18 +01:00
13 changed files with 61 additions and 88 deletions

View File

@@ -1,2 +1 @@
/opt/docker
/var/lib/docker/volumes /var/lib/docker/volumes

View File

@@ -0,0 +1 @@
/var/lib/containers

View File

@@ -1,7 +1,7 @@
hosts_to_backup: hosts_to_backup:
- { hostname: "mariadb02", fqdn: "mariadb02.universe.local." } - { hostname: "mariadb02", fqdn: "mariadb02.universe.local." }
- { hostname: "haproxy02", fqdn: "haproxy02.universe.local." } - { hostname: "haproxy02", fqdn: "haproxy02.universe.local." }
- { hostname: "AdGuard", fqdn: "AdGuard.universe.local." } - { hostname: "mail", fqdn: "mail.universe.local." }
- { hostname: "owntrack", fqdn: "owntrack.universe.local." } - { hostname: "owntrack", fqdn: "owntrack.universe.local." }
- { hostname: "endor", fqdn: "endor.universe.local." } - { hostname: "endor", fqdn: "endor.universe.local." }
- { hostname: "step-ca", fqdn: "step-ca.universe.local." } - { hostname: "step-ca", fqdn: "step-ca.universe.local." }
@@ -10,36 +10,42 @@ hosts_to_backup:
- { hostname: "searx", fqdn: "searx.universe.local." } - { hostname: "searx", fqdn: "searx.universe.local." }
- { hostname: "dnspri", fqdn: "dnspri.universe.local." } - { hostname: "dnspri", fqdn: "dnspri.universe.local." }
- { hostname: "gs1900-8hp", fqdn: "gs1900-8hp.universe.local." } - { hostname: "gs1900-8hp", fqdn: "gs1900-8hp.universe.local." }
- { hostname: "librenms", fqdn: "librenms.universe.local." }
- { hostname: "webserver", fqdn: "webserver.universe.local." } - { hostname: "webserver", fqdn: "webserver.universe.local." }
- { hostname: "agh01", fqdn: "agh01.universe.local." } - { hostname: "agh01", fqdn: "agh01.universe.local." }
- { hostname: "mastodon", fqdn: "mastodon.universe.local." } - { hostname: "mastodon", fqdn: "mastodon.universe.local." }
- { hostname: "icinga", fqdn: "icinga.universe.local." }
- { hostname: "haproxy01", fqdn: "haproxy01.universe.local." } - { hostname: "haproxy01", fqdn: "haproxy01.universe.local." }
- { hostname: "freeradius", fqdn: "freeradius.universe.local." }
- { hostname: "dhcp-kea", fqdn: "dhcp-kea.universe.local." } - { hostname: "dhcp-kea", fqdn: "dhcp-kea.universe.local." }
- { hostname: "pi-alert-lan", fqdn: "pi-alert-lan.universe.local." } - { hostname: "pi-alert-lan", fqdn: "pi-alert-lan.universe.local." }
- { hostname: "mariadb01", fqdn: "mariadb01.universe.local." } - { hostname: "mariadb01", fqdn: "mariadb01.universe.local." }
- { hostname: "dhcp-stork", fqdn: "dhcp-stork.universe.local." } - { hostname: "dhcp-stork", fqdn: "dhcp-stork.universe.local." }
- { hostname: "paperless", fqdn: "paperless.universe.local." }
- { hostname: "truenas", fqdn: "truenas.universe.local." } - { hostname: "truenas", fqdn: "truenas.universe.local." }
- { hostname: "grafana", fqdn: "grafana.universe.local." }
- { hostname: "idrac-dell", fqdn: "idrac-dell.universe.local." } - { hostname: "idrac-dell", fqdn: "idrac-dell.universe.local." }
- { hostname: "docker01", fqdn: "docker01.universe.local." } - { hostname: "docker01", fqdn: "docker01.universe.local." }
- { hostname: "pi-alert", fqdn: "pi-alert.universe.local." } - { hostname: "pi-alert", fqdn: "pi-alert.universe.local." }
- { hostname: "tatooine", fqdn: "tatooine.universe.local." } - { hostname: "pixelfed", fqdn: "pixelfed.universe.local." }
- { hostname: "pve2", fqdn: "pve2.universe.local." } - { hostname: "pve2", fqdn: "pve2.universe.local." }
- { hostname: "dnssec2", fqdn: "dnssec2.universe.local." } - { hostname: "dnssec2", fqdn: "dnssec2.universe.local." }
- { hostname: "pve", fqdn: "pve.universe.local." } - { hostname: "pve", fqdn: "pve.universe.local." }
- { hostname: "jitsimeet", fqdn: "jitsimeet.universe.local." }
- { hostname: "haproxy", fqdn: "haproxy.universe.local." } - { hostname: "haproxy", fqdn: "haproxy.universe.local." }
- { hostname: "homeassistant", fqdn: "homeassistant.universe.local." } - { hostname: "homeassistant", fqdn: "homeassistant.universe.local." }
- { hostname: "ns1", fqdn: "ns1.universe.local." } - { hostname: "ns1", fqdn: "ns1.universe.local." }
- { hostname: "pve-ha", fqdn: "pve-ha.universe.local." }
- { hostname: "backup", fqdn: "backup.universe.local." } - { hostname: "backup", fqdn: "backup.universe.local." }
- { hostname: "tinyproxy", fqdn: "tinyproxy.universe.local." } - { hostname: "tinyproxy", fqdn: "tinyproxy.universe.local." }
- { hostname: "bastion", fqdn: "bastion.universe.local." }
- { hostname: "tatooine2", fqdn: "tatooine2.universe.local." } - { hostname: "tatooine2", fqdn: "tatooine2.universe.local." }
- { hostname: "mailcow", fqdn: "mailcow.universe.local." } - { hostname: "mailcow", fqdn: "mailcow.universe.local." }
- { hostname: "netbox", fqdn: "netbox.universe.local." } - { hostname: "netbox", fqdn: "netbox.universe.local." }
- { hostname: "AdGuard", fqdn: "AdGuard.universe.local." }
- { hostname: "samba-ad-dc2", fqdn: "samba-ad-dc2.universe.local." } - { hostname: "samba-ad-dc2", fqdn: "samba-ad-dc2.universe.local." }
- { hostname: "graylog", fqdn: "graylog.universe.local." }
- { hostname: "bmc-truenas", fqdn: "bmc-truenas.universe.local." } - { hostname: "bmc-truenas", fqdn: "bmc-truenas.universe.local." }
- { hostname: "shinobi", fqdn: "shinobi.universe.local." }
- { hostname: "nextcloud", fqdn: "nextcloud.universe.local." } - { hostname: "nextcloud", fqdn: "nextcloud.universe.local." }
- { hostname: "podman01", fqdn: "podman01.universe.local." }
- { hostname: "docker02", fqdn: "docker02.universe.local." } - { hostname: "docker02", fqdn: "docker02.universe.local." }
- { hostname: "dnssec1", fqdn: "dnssec1.universe.local." } - { hostname: "dnssec1", fqdn: "dnssec1.universe.local." }
- { hostname: "samba-ad-dc1", fqdn: "samba-ad-dc1.universe.local." } - { hostname: "samba-ad-dc1", fqdn: "samba-ad-dc1.universe.local." }

View File

@@ -22,10 +22,10 @@
validate: "visudo -cf %s" validate: "visudo -cf %s"
when: ansible_facts['os_family'] == "Archlinux" when: ansible_facts['os_family'] == "Archlinux"
- name: "[Arch] Install AUR helper" # - name: "[Arch] Install AUR helper"
community.general.aur: # community.general.aur:
name: "{{ aur_helper }}" # name: "{{ aur_helper }}"
state: present # state: present
use: makepkg # use: makepkg
become_user: "{{ aur_build_user }}" # become_user: "{{ aur_build_user }}"
when: ansible_facts['os_family'] == "Archlinux" # when: ansible_facts['os_family'] == "Archlinux"

View File

@@ -6,9 +6,7 @@
container_name_include = [] container_name_include = []
container_name_exclude = [] container_name_exclude = []
timeout = "5s" timeout = "5s"
perdevice = false
perdevice_include = ["cpu", "blkio", "network"] perdevice_include = ["cpu", "blkio", "network"]
total = false
total_include = ["cpu", "blkio", "network"] total_include = ["cpu", "blkio", "network"]
docker_label_include = [] docker_label_include = []
docker_label_exclude = [] docker_label_exclude = []

View File

@@ -1,9 +0,0 @@
caddy_email: "admin@example.com"
portal_domain: "portal.example.com"
nextcloud_domain: "nextcloud.example.net"
nextcloud_target: "10.0.10.12:80"
gitea_domain: "git.example.net"
gitea_target: "10.0.10.13:3000"

View File

@@ -1,11 +0,0 @@
---
- name: reload systemd
command: systemctl daemon-reload
- name: restart caddy-portal
systemd:
name: caddy-portal
state: restarted
- name: reload caddy
command: caddy reload --config /etc/caddy/Caddyfile

View File

@@ -12,7 +12,7 @@
when: ansible_distribution in ["Debian", "Ubuntu", "Linux Mint"] when: ansible_distribution in ["Debian", "Ubuntu", "Linux Mint"]
- ansible.builtin.import_tasks: caddy_config.yml - ansible.builtin.import_tasks: caddy_config.yml
- ansible.builtin.import_tasks: caddy_service.yml - ansible.builtin.import_tasks: caddy_service.yml
- ansible.builtin.import_tasks: install_caddy_portal.yml
rescue: rescue:
- set_fact: task_failed=true - set_fact: task_failed=true

View File

@@ -0,0 +1,37 @@
---
- name: Install dependencies
apt:
name:
- curl
- unzip
- git
- build-essential
state: present
update_cache: yes
- name: Download xcaddy
get_url:
url: https://github.com/caddyserver/xcaddy/releases/download/v0.9.5/xcaddy_0.9.5_linux_amd64.tar.gz
dest: /tmp/xcaddy.tar.gz
- name: Extract xcaddy
unarchive:
src: /tmp/xcaddy.tar.gz
dest: /usr/local/bin/
mode: 0755
remote_src: yes
- name: Build Caddy with PowerDNS DNS plugin
command: >
xcaddy build
--with github.com/caddy-dns/powerdns
args:
chdir: /usr/local/bin
creates: /usr/local/bin/caddy-custom
- name: Move custom caddy binary
copy:
src: /usr/local/bin/caddy
dest: /usr/local/bin/caddy
mode: 0755
remote_src: yes

View File

@@ -1,34 +0,0 @@
---
- name: Create caddy-portal directory
file:
path: /opt/caddy-portal
state: directory
owner: root
group: root
mode: '0755'
- name: Download caddy-portal installer
get_url:
url: "https://github.com/caddy-portal/caddy-portal/releases/latest/download/install.sh"
dest: /opt/caddy-portal/install.sh
mode: "0755"
- name: Run caddy-portal installer
command: bash /opt/caddy-portal/install.sh
args:
creates: /usr/local/bin/caddy-portal
register: portal_install
- name: Install systemd service for caddy-portal
template:
src: caddy-portal.service.j2
dest: /etc/systemd/system/caddy-portal.service
notify:
- reload systemd
- restart caddy-portal
- name: Enable caddy-portal
systemd:
name: caddy-portal
enabled: true
state: started

View File

@@ -1,14 +0,0 @@
[Unit]
Description=Caddy Portal
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/local/bin/caddy-portal server
Restart=always
RestartSec=5
User=root
WorkingDirectory=/opt/caddy-portal
[Install]
WantedBy=multi-user.target

View File

@@ -24,12 +24,12 @@
- name: server | telegraf | verify and import key - name: server | telegraf | verify and import key
ansible.builtin.shell: ansible.builtin.shell:
cmd: "gpg --show-keys --with-fingerprint --with-colons /tmp/influxdata.key 2>&1 | grep -q '^fpr:\\+24C975CBA61A024EE1B631787C3D57159FC2F927:$' && cat /tmp/influxdata.key | gpg --dearmor | tee /etc/apt/keyrings/influxdata.gpg > /dev/null" cmd: "gpg --show-keys --with-fingerprint --with-colons /tmp/influxdata.key 2>&1 | grep -q '^fpr:\\+24C975CBA61A024EE1B631787C3D57159FC2F927:$' && cat /tmp/influxdata.key | gpg --dearmor | tee /usr/share/keyrings/influxdata.gpg > /dev/null"
creates: "/etc/apt/trusted.gpg.d/influxdata.gpg" creates: "/usr/share/keyrings/influxdata.gpg"
- name: server | telegraf | add repository - name: server | telegraf | add repository
ansible.builtin.shell: ansible.builtin.shell:
cmd: "echo 'deb [signed-by=/etc/apt/keyrings/influxdata.gpg] https://repos.influxdata.com/debian stable main' | tee /etc/apt/sources.list.d/influxdata.list" cmd: "echo 'deb [signed-by=/usr/share/keyrings/influxdata.gpg] https://repos.influxdata.com/debian stable main' | tee /etc/apt/sources.list.d/influxdata.list"
creates: "/etc/apt/sources.list.d/influxdata.list" creates: "/etc/apt/sources.list.d/influxdata.list"
- name: server | telegraf | install telegraf - name: server | telegraf | install telegraf