From be2208b24567a36a35459d9bd2148af00d169307 Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Sat, 24 Oct 2026 00:14:43 -0400 Subject: [PATCH] Adding uptime kuma config --- inventory/hosts.ini | 3 +++ playbooks/docker.yml | 4 +++- playbooks/uptime_kuma.yml | 23 +++++++++++++++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 playbooks/uptime_kuma.yml diff --git a/inventory/hosts.ini b/inventory/hosts.ini index 0341b58..65517ca 100644 --- a/inventory/hosts.ini +++ b/inventory/hosts.ini @@ -69,6 +69,9 @@ pitty-v1-pico ansible_host=10.7.10.16 smtp1 ansible_host=smtp1.int.metaunix.net smtp2 ansible_host=smtp2.int.metaunix.net +[uptime_kuma] +pi5b1g ansible_host=10.7.20.69 + [web_servers] www3 ansible_host=www3.int.metaunix.net www4 ansible_host=www4.int.metaunix.net diff --git a/playbooks/docker.yml b/playbooks/docker.yml index f5522b2..ca57dbb 100644 --- a/playbooks/docker.yml +++ b/playbooks/docker.yml @@ -1,7 +1,9 @@ --- - name: Install and configure Docker - hosts: ci_servers + hosts: + - ci_servers + - uptime_kuma become: true roles: diff --git a/playbooks/uptime_kuma.yml b/playbooks/uptime_kuma.yml new file mode 100644 index 0000000..c020dbd --- /dev/null +++ b/playbooks/uptime_kuma.yml @@ -0,0 +1,23 @@ +--- + +- name: Deploy Uptime Kuma 2 + hosts: uptime_kuma + become: true + + tasks: + - name: Ensure named Docker volume exists + community.docker.docker_volume: + name: uptime-kuma + state: present + + - name: Run Uptime Kuma container + community.docker.docker_container: + name: uptime-kuma + image: louislam/uptime-kuma:2 + state: started + restart_policy: unless-stopped + published_ports: + - "3001:3001" + volumes: + - uptime-kuma:/app/data + pull: true