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: build:
runs-on: docker runs-on: docker
container: container:
image: docker.io/library/python:3.14-trixie image: docker.io/library/python:3.15-trixie
steps: steps:
- name: Pipeline info - name: Pipeline info
run: | run: |

View file

@ -24,7 +24,7 @@ jobs:
# work in our environmnet. # work in our environmnet.
# Rather manually setup python (pip) before instead. # Rather manually setup python (pip) before instead.
- name: Run ansible-lint - 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: with:
setup_python: "false" setup_python: "false"
requirements_file: "requirements.yml" requirements_file: "requirements.yml"

View file

@ -1,7 +1,7 @@
# renovate: datasource=docker depName=git.hamburg.ccc.de/ccchh/oci-images/nextcloud # renovate: datasource=docker depName=git.hamburg.ccc.de/ccchh/oci-images/nextcloud
nextcloud__version: 34 nextcloud__version: 34
# renovate: datasource=docker depName=docker.io/library/postgres # 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__fqdn: cloud.hamburg.ccc.de
nextcloud__data_dir: /data/nextcloud nextcloud__data_dir: /data/nextcloud
nextcloud__extra_configuration: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/cloud/nextcloud/extra_configuration.config.php.j2') }}" 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 # 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__config: "{{ lookup('ansible.builtin.template', 'resources/chaosknoten/netbox/netbox/configuration.py.j2') }}"
netbox__custom_pipeline_oidc_group_and_role_mapping: true 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') }}" content: "{{ lookup('ansible.builtin.file', 'resources/chaosknoten/pad/nginx/pad.hamburg.ccc.de.conf') }}"
# renovate: datasource=docker depName=quay.io/hedgedoc/hedgedoc # 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: services:
prometheus: prometheus:
image: docker.io/prom/prometheus:v3.13.1 image: docker.io/prom/prometheus:v3.15.1
container_name: prometheus container_name: prometheus
command: command:
- '--config.file=/etc/prometheus/prometheus.yml' - '--config.file=/etc/prometheus/prometheus.yml'
@ -19,7 +19,7 @@ services:
- prom_data:/prometheus - prom_data:/prometheus
alertmanager: alertmanager:
image: docker.io/prom/alertmanager:v0.33.1 image: docker.io/prom/alertmanager:v0.34.2
container_name: alertmanager container_name: alertmanager
command: command:
- '--config.file=/etc/alertmanager/alertmanager.yaml' - '--config.file=/etc/alertmanager/alertmanager.yaml'
@ -32,7 +32,7 @@ services:
- alertmanager_data:/alertmanager - alertmanager_data:/alertmanager
grafana: grafana:
image: docker.io/grafana/grafana:13.1.0 image: docker.io/grafana/grafana:13.3.0
container_name: grafana container_name: grafana
ports: ports:
- 3000:3000 - 3000:3000
@ -46,7 +46,7 @@ services:
- graf_data:/var/lib/grafana - graf_data:/var/lib/grafana
pve-exporter: 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 container_name: pve-exporter
ports: ports:
- 9221:9221 - 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. # Renders the PDF handouts (HTML to PDF with Chromium); needs internet access for the map tiles.
gotenberg: 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"] command: ["gotenberg", "--api-timeout=60s", "--libreoffice-disable-routes"]
networks: networks:
frontend: frontend:

View file

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

View file

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

View file

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

View file

@ -4,7 +4,7 @@
services: services:
database: database:
image: docker.io/library/postgres:18.4 image: docker.io/library/postgres:18.6
restart: always restart: always
volumes: volumes:
- ./database:/var/lib/postgresql - ./database:/var/lib/postgresql
@ -16,7 +16,7 @@ services:
- gatus - gatus
gatus: gatus:
image: ghcr.io/twin/gatus:v5.36.0 image: ghcr.io/twin/gatus:v5.38.0
restart: always restart: always
ports: ports:
- "8080:8080" - "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 virtualenv: /usr/local/lib/ansible_pull_venv
become: true become: true
- name: ensure ansible-pull-failure-notify script installation exists - name: ensure helper script installations exist
ansible.builtin.template: ansible.builtin.copy:
src: ansible-pull-failure-notify.sh.j2 src: "{{ item }}.sh"
dest: /usr/local/sbin/ansible-pull-failure-notify.sh dest: "/usr/local/sbin/{{ item }}"
owner: root owner: root
group: root group: root
mode: "0755" mode: "0755"
become: true 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 - name: ensure secrets directory exists
ansible.builtin.file: ansible.builtin.file:
@ -51,7 +65,7 @@
group: "{{ ansible_pull__user }}" group: "{{ ansible_pull__user }}"
become: true become: true
- name: ensure systemd services exists - name: ensure templated systemd services exists
ansible.builtin.template: ansible.builtin.template:
src: "{{ item }}.j2" src: "{{ item }}.j2"
dest: "/etc/systemd/system/{{ item }}" dest: "/etc/systemd/system/{{ item }}"
@ -61,7 +75,21 @@
become: true become: true
loop: loop:
- ansible-pull.service - 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-failure-notify.service
- ansible-pull-reboot.service
- ansible-pull-successful-run-timestamp-exporter.service
notify: notify:
- systemd daemon reload - systemd daemon reload

View file

@ -3,6 +3,7 @@ Description=ansible-pull for configuration and maintenance
After=network-online.target After=network-online.target
Wants=network-online.target Wants=network-online.target
OnFailure=ansible-pull-failure-notify.service OnFailure=ansible-pull-failure-notify.service
OnSuccess=ansible-pull-successful-run-timestamp-exporter.service ansible-pull-reboot.service
[Service] [Service]
Type=oneshot Type=oneshot
@ -19,6 +20,3 @@ ExecStart=/usr/local/lib/ansible_pull_venv/bin/ansible-pull \
--inventory "{{ ansible_pull__inventory }}" \ --inventory "{{ ansible_pull__inventory }}" \
"{{ ansible_pull__playbook }}" "{{ ansible_pull__playbook }}"
User={{ ansible_pull__user }} 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'