forked from jakub/ansible
.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
# nextcloud/update_uptime_kuma.yml
|
||||
|
||||
- name: Update Uptime Kuma on VM via Proxmox
|
||||
hosts: proxmox
|
||||
gather_facts: false
|
||||
@@ -21,12 +19,12 @@
|
||||
kuma_image: "louislam/uptime-kuma:latest"
|
||||
kuma_port: 3001
|
||||
|
||||
# Optional external URL for controller-side readiness check (e.g., https://kuma.example.com).
|
||||
# Optional external URL for controller-side readiness check (e.g., https://kuma.example.com)
|
||||
# If empty/undefined, controller check is skipped and we only probe from the VM.
|
||||
kuma_url: "{{ lookup('env', 'KUMA_URL') | default('', true) }}"
|
||||
|
||||
# Debug toggle for the final HTML excerpt
|
||||
kuma_debug_home: true
|
||||
# Fixed container name used in your compose (conflicts with previous/Portainer-run container)
|
||||
kuma_container_name: "uptime-kuma-dev"
|
||||
|
||||
# Docker command prefix (consistent behavior)
|
||||
docker_prefix: "unalias docker 2>/dev/null || true; DOCKER_CLI_HINTS=0; command docker"
|
||||
@@ -35,6 +33,9 @@
|
||||
kuma_commands:
|
||||
- "{{ docker_prefix }} pull -q {{ kuma_image }} >/dev/null"
|
||||
- "{{ docker_prefix }} compose -p {{ kuma_project }} -f {{ kuma_compose_file }} pull {{ kuma_service }} >/dev/null"
|
||||
# --- added: gently remove conflicting container name before compose up ---
|
||||
- "{{ docker_prefix }} rm -f {{ kuma_container_name }} >/dev/null 2>&1 || true"
|
||||
# ------------------------------------------------------------------------
|
||||
- "{{ docker_prefix }} compose -p {{ kuma_project }} -f {{ kuma_compose_file }} up -d --no-deps --force-recreate {{ kuma_service }} >/dev/null"
|
||||
|
||||
tasks:
|
||||
@@ -163,4 +164,4 @@
|
||||
- name: Kuma | HTML excerpt (debug)
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ (kuma_home_html | default(''))[:500] }}"
|
||||
when: kuma_debug_home and (kuma_home_html is defined)
|
||||
when: kuma_home_html is defined
|
||||
|
||||
Reference in New Issue
Block a user