add uptime kuma
This commit is contained in:
parent
ed2ce14258
commit
306abe6c32
4 changed files with 29 additions and 3 deletions
|
@ -21,4 +21,4 @@ deploy_ssh_certificates:
|
|||
signing_key: hyp_host
|
||||
host: lewis.hyp
|
||||
|
||||
docker_repository: ubuntu
|
||||
docker_repository: debian
|
||||
|
|
|
@ -51,6 +51,6 @@
|
|||
roles:
|
||||
- {role: apt, tags: apt}
|
||||
- {role: deploy_ssh_certificates, tags: deploy_ssh_certificates}
|
||||
# - {role: docker, tags: docker}
|
||||
# - {role: uptime_kuma, tags: uptime_kuma}
|
||||
- {role: docker, tags: docker}
|
||||
- {role: uptime_kuma, tags: uptime_kuma}
|
||||
# - {role: alerts, tags: alerts}
|
||||
|
|
11
roles/uptime_kuma/docker-compose.yml.j2
Normal file
11
roles/uptime_kuma/docker-compose.yml.j2
Normal file
|
@ -0,0 +1,11 @@
|
|||
version: '3.3'
|
||||
|
||||
services:
|
||||
uptime-kuma:
|
||||
image: louislam/uptime-kuma:1
|
||||
ports:
|
||||
- 3001:3001
|
||||
container_name: uptime-kuma
|
||||
restart: always
|
||||
volumes:
|
||||
- {{ backup_mount_point }}/uptime-kuma/data:/app/data
|
15
roles/uptime_kuma/tasks/main.yml
Normal file
15
roles/uptime_kuma/tasks/main.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
- name: Create working directory
|
||||
file:
|
||||
path: /srv/uptime-kuma
|
||||
state: directory
|
||||
|
||||
- name: Copy Docker compose file
|
||||
template:
|
||||
src: "{{ role_path }}/docker-compose.yml.j2"
|
||||
dest: /srv/uptime-kuma/docker-compose.yml
|
||||
|
||||
- name: Deploy Docker compose
|
||||
docker_compose:
|
||||
project_src: /srv/uptime-kuma
|
||||
pull: true
|
||||
remove_orphans: true
|
Reference in a new issue