Provision uptime-kuma
This commit is contained in:
parent
1399529a47
commit
f3bc72d2ba
5 changed files with 44 additions and 0 deletions
|
@ -88,6 +88,7 @@
|
|||
- plausible
|
||||
- pages
|
||||
- restic
|
||||
- uptime_kuma
|
||||
|
||||
- hosts: jellyfin
|
||||
roles:
|
||||
|
|
14
ansible/roles/uptime_kuma/files/docker-compose.yml
Normal file
14
ansible/roles/uptime_kuma/files/docker-compose.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
version: "2.3"
|
||||
|
||||
services:
|
||||
uptime-kuma:
|
||||
image: louislam/uptime-kuma:1
|
||||
restart: unless-stopped
|
||||
user: "{{ docker_user.id }}:{{ docker_user.id }}"
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.uptime-kuma.rule=Host(`uptime.jakehoward.tech`)
|
||||
- traefik.http.routers.uptime-kuma.tls.certresolver=le
|
||||
- traefik.http.routers.uptime-kuma.middlewares=compress@file
|
4
ansible/roles/uptime_kuma/handlers/main.yml
Normal file
4
ansible/roles/uptime_kuma/handlers/main.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
- name: restart uptime-kuma
|
||||
shell:
|
||||
chdir: /opt/uptime-kuma
|
||||
cmd: "{{ docker_update_command }}"
|
17
ansible/roles/uptime_kuma/tasks/main.yml
Normal file
17
ansible/roles/uptime_kuma/tasks/main.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
- name: Create install directory
|
||||
file:
|
||||
path: /opt/uptime-kuma
|
||||
state: directory
|
||||
owner: "{{ docker_user.name }}"
|
||||
mode: "{{ docker_compose_directory_mask }}"
|
||||
become: true
|
||||
|
||||
- name: Install compose file
|
||||
template:
|
||||
src: files/docker-compose.yml
|
||||
dest: /opt/uptime-kuma/docker-compose.yml
|
||||
mode: "{{ docker_compose_file_mask }}"
|
||||
owner: "{{ docker_user.name }}"
|
||||
validate: docker-compose -f %s config
|
||||
notify: restart uptime-kuma
|
||||
become: true
|
|
@ -147,3 +147,11 @@ resource "cloudflare_record" "jakehowardtech_vaultwarden" {
|
|||
type = "A"
|
||||
ttl = 1
|
||||
}
|
||||
|
||||
resource "cloudflare_record" "jakehowardtech_uptime" {
|
||||
zone_id = cloudflare_zone.jakehowardtech.id
|
||||
name = "uptime"
|
||||
value = vultr_instance.walker.main_ip
|
||||
type = "A"
|
||||
ttl = 1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue