Compare commits

...
Author SHA1 Message Date
f1545e6dc2 Update all stable non-major dependencies
All checks were successful
/ build (pull_request) Successful in 54s
/ Ansible Lint (push) Successful in 3m50s
/ Ansible Lint (pull_request) Successful in 3m52s
2026-11-04 20:17:04 +00:00
947d8fd0a0
ansible-pull(role): deploy failure notify service using the copy loop
All checks were successful
/ build (pull_request) Successful in 32s
/ build (push) Successful in 37s
/ cleanup-staging (pull_request) Successful in 41s
/ Ansible Lint (pull_request) Successful in 3m47s
/ Ansible Lint (push) Successful in 3m45s
Deploy the ansible-pull-failure-notify.service using the loop using
ansible.builtin.copy as it doesn't have any template logic.
2026-11-04 17:28:05 +01:00
a4a92448dc
ansible-pull(role): have failure notify deploy match other script deploy
Have the deployment of the ansible-pull-failure-notify script match the
deployment of the other helper scripts.
2026-11-04 17:28:05 +01:00
96a7eabbac
ansible-pull(role): move ansible-pull reboot logic to script as well
Do this to unify the way these helper scripts get deployed.
2026-11-04 17:28:05 +01:00
1157c98ff5
ansible-pull(role): make successful run timestamp exporter work
The successful run timestamp exporter didn't work, because the
ansible-pull user wouldn't necessarily have the necessary permissions
and because the command wouldn't properly work.
Move the timestamp export as well as the reboot to separate services,
which always run as root, to ensure these operations work and to have a
clean setup using systemd services.
Also move the successful run timestamp exporter to a custom script to
have it work properly.
2026-11-04 17:28:03 +01:00
18 changed files with 76 additions and 23 deletions

View file

@ -11,7 +11,7 @@ jobs:
build:
runs-on: docker
container:
image: docker.io/library/python:3.14-trixie
image: docker.io/library/python:3.15-trixie
steps:
- name: Pipeline info
run: |

View file

@ -24,7 +24,7 @@ jobs:
# work in our environmnet.
# Rather manually setup python (pip) before instead.
- name: Run ansible-lint
uses: https://github.com/ansible/ansible-lint@v26.6.0
uses: https://github.com/ansible/ansible-lint@v26.10.1
with:
setup_python: "false"
requirements_file: "requirements.yml"

View file

@ -1,7 +1,7 @@
# renovate: datasource=docker depName=git.hamburg.ccc.de/ccchh/oci-images/nextcloud
nextcloud__version: 34
# renovate: datasource=docker depName=docker.io/library/postgres
nextcloud__postgres_version: 15.18
nextcloud__postgres_version: 15.19
nextcloud__fqdn: cloud.hamburg.ccc.de
nextcloud__data_dir: /data/nextcloud
nextcloud__extra_configuration: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/cloud/nextcloud/extra_configuration.config.php.j2') }}"

View file

@ -1,5 +1,5 @@
# renovate: datasource=github-releases depName=netbox packageName=netbox-community/netbox
netbox__version: "v4.6.4"
netbox__version: "v4.7.4"
netbox__config: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/netbox/netbox/configuration.py.j2') }}"
netbox__custom_pipeline_oidc_group_and_role_mapping: true

View file

@ -13,4 +13,4 @@ nginx__configurations:
content: "{{ lookup('ansible.builtin.file', 'resources/chaosknoten/pad/nginx/pad.hamburg.ccc.de.conf') }}"
# renovate: datasource=docker depName=quay.io/hedgedoc/hedgedoc
host_pad__docker_compose__hedgedoc_version: 1.11.1
host_pad__docker_compose__hedgedoc_version: 1.12.0

View file

@ -2,7 +2,7 @@
services:
prometheus:
image: docker.io/prom/prometheus:v3.13.1
image: docker.io/prom/prometheus:v3.15.1
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
@ -19,7 +19,7 @@ services:
- prom_data:/prometheus
alertmanager:
image: docker.io/prom/alertmanager:v0.33.1
image: docker.io/prom/alertmanager:v0.34.2
container_name: alertmanager
command:
- '--config.file=/etc/alertmanager/alertmanager.yaml'
@ -32,7 +32,7 @@ services:
- alertmanager_data:/alertmanager
grafana:
image: docker.io/grafana/grafana:13.1.0
image: docker.io/grafana/grafana:13.3.0
container_name: grafana
ports:
- 3000:3000
@ -46,7 +46,7 @@ services:
- graf_data:/var/lib/grafana
pve-exporter:
image: docker.io/prompve/prometheus-pve-exporter:3.9.0
image: docker.io/prompve/prometheus-pve-exporter:3.11.0
container_name: pve-exporter
ports:
- 9221:9221

View file

@ -59,7 +59,7 @@ services:
# Renders the PDF handouts (HTML to PDF with Chromium); needs internet access for the map tiles.
gotenberg:
image: docker.io/gotenberg/gotenberg:8.38.1
image: docker.io/gotenberg/gotenberg:8.39.0
command: ["gotenberg", "--api-timeout=60s", "--libreoffice-disable-routes"]
networks:
frontend:

View file

@ -1,7 +1,7 @@
---
services:
ntfy:
image: docker.io/binwiederhier/ntfy:v2.26.0
image: docker.io/binwiederhier/ntfy:v2.37.2
container_name: ntfy
command:
- serve

View file

@ -15,7 +15,7 @@ services:
- pretalx_net
redis:
image: docker.io/library/redis:8.8.0
image: docker.io/library/redis:8.10.3
restart: unless-stopped
volumes:
- redis:/data

View file

@ -13,7 +13,7 @@ services:
restart: unless-stopped
redis:
image: docker.io/library/redis:8.8.0
image: docker.io/library/redis:8.10.3
ports:
- "6379:6379"
volumes:

View file

@ -4,7 +4,7 @@
services:
database:
image: docker.io/library/postgres:18.4
image: docker.io/library/postgres:18.6
restart: always
volumes:
- ./database:/var/lib/postgresql
@ -16,7 +16,7 @@ services:
- gatus
gatus:
image: ghcr.io/twin/gatus:v5.36.0
image: ghcr.io/twin/gatus:v5.38.0
restart: always
ports:
- "8080:8080"

View file

@ -0,0 +1,7 @@
[Unit]
Description=ansible-pull failure notifier
[Service]
Type=oneshot
ExecStart=ansible-pull-failure-notify
User=root

View file

@ -0,0 +1,7 @@
[Unit]
Description=ansible-pull reboot, if required
After=ansible-pull.service
[Service]
Type=oneshot
ExecStart=ansible-pull-reboot

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Reboot, if /var/run/reboot-required or /var/run/ansible-reboot-required exist.
if [ -e /var/run/reboot-required ] || [ -e /var/run/ansible-reboot-required ]; then
systemctl reboot
fi

View file

@ -0,0 +1,8 @@
[Unit]
Description=ansible-pull successful run timestamp exporter
After=ansible-pull.service
Before=ansible-pull-reboot.service
[Service]
Type=oneshot
ExecStart=ansible-pull-successful-run-timestamp-exporter

View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -eo pipefail
echo "ansible_pull_last_successful_run_timestamp_seconds $(date +%s)" > /var/lib/node_exporter_textfile/ansible_pull.prom.$$
mv /var/lib/node_exporter_textfile/ansible_pull.prom.$$ /var/lib/node_exporter_textfile/ansible_pull.prom

View file

@ -24,14 +24,28 @@
virtualenv: /usr/local/lib/ansible_pull_venv
become: true
- name: ensure ansible-pull-failure-notify script installation exists
ansible.builtin.template:
src: ansible-pull-failure-notify.sh.j2
dest: /usr/local/sbin/ansible-pull-failure-notify.sh
- name: ensure helper script installations exist
ansible.builtin.copy:
src: "{{ item }}.sh"
dest: "/usr/local/sbin/{{ item }}"
owner: root
group: root
mode: "0755"
become: true
loop:
- ansible-pull-successful-run-timestamp-exporter
- ansible-pull-reboot
- name: ensure templated helper script installations exists
ansible.builtin.template:
src: "{{ item }}.sh.j2"
dest: "/usr/local/sbin/{{ item }}"
owner: root
group: root
mode: "0755"
become: true
loop:
- ansible-pull-failure-notify
- name: ensure secrets directory exists
ansible.builtin.file:
@ -51,7 +65,7 @@
group: "{{ ansible_pull__user }}"
become: true
- name: ensure systemd services exists
- name: ensure templated systemd services exists
ansible.builtin.template:
src: "{{ item }}.j2"
dest: "/etc/systemd/system/{{ item }}"
@ -61,7 +75,21 @@
become: true
loop:
- ansible-pull.service
notify:
- systemd daemon reload
- name: ensure systemd services exists
ansible.builtin.copy:
src: "{{ item }}"
dest: "/etc/systemd/system/{{ item }}"
owner: root
group: root
mode: "0644"
become: true
loop:
- ansible-pull-failure-notify.service
- ansible-pull-reboot.service
- ansible-pull-successful-run-timestamp-exporter.service
notify:
- systemd daemon reload

View file

@ -3,6 +3,7 @@ Description=ansible-pull for configuration and maintenance
After=network-online.target
Wants=network-online.target
OnFailure=ansible-pull-failure-notify.service
OnSuccess=ansible-pull-successful-run-timestamp-exporter.service ansible-pull-reboot.service
[Service]
Type=oneshot
@ -19,6 +20,3 @@ ExecStart=/usr/local/lib/ansible_pull_venv/bin/ansible-pull \
--inventory "{{ ansible_pull__inventory }}" \
"{{ ansible_pull__playbook }}"
User={{ ansible_pull__user }}
ExecStartPost=/usr/bin/bash -c 'echo "ansible_pull_last_successful_run_timestamp_seconds $(date +%s)" > /var/lib/node_exporter_textfile/ansible_pull.prom.$$; mv /var/lib/node_exporter_textfile/ansible_pull.prom.$$ /var/lib/node_exporter_textfile/ansible_pull.prom'
# Reboot, if /var/run/reboot-required or /var/run/ansible-reboot-required exist.
ExecStartPost=/usr/bin/bash -c 'if [ -e /var/run/reboot-required ] || [ -e /var/run/ansible-reboot-required ]; then sudo systemctl reboot; fi'