Commit initial
This commit is contained in:
commit
0df4ad9e73
6 changed files with 79 additions and 0 deletions
29
README.md
Normal file
29
README.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
# Role : docker_uptimekuma
|
||||
|
||||
## Services fournis
|
||||
|
||||
- main.yml : Installation de uptimekuma sur un serveur docker_host
|
||||
|
||||
|
||||
## Variables
|
||||
|
||||
Fournir les variables suivantes. Par exemple :
|
||||
|
||||
```yaml
|
||||
docker_uptimekuma_fqdn: uptimekuma.libretic.fr
|
||||
docker_uptimekuma_version: 1.17.1-debian
|
||||
docker_uptimekuma_data_dir: /data1
|
||||
docker_uptimekuma_service_id: uptimekuma
|
||||
```
|
||||
|
||||
| Option | Valeur par défaut | Description |
|
||||
|------------------------------|-------------------|--------------------------------------------------------------------------------------------|
|
||||
| docker_uptimekuma_fqdn | | Le fqdn pour accéder à uptimekuma |
|
||||
| docker_uptimekuma_version | | Version de l'image uptimekuma |
|
||||
| docker_uptimekuma_data_dir | | L'emplacement dans lequel se trouvent les volumes de donnees docker pour le service |
|
||||
| docker_uptimekuma_service_id | | Le nom de service souhaité : conditionne le nommage des dossiers et le routage par traefik |
|
||||
|
||||
|
||||
## Configuration de uptimekuma
|
||||
|
||||
A détailler
|
0
defaults/main.yml
Normal file
0
defaults/main.yml
Normal file
5
handlers/main.yml
Normal file
5
handlers/main.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
- name: docker-compose-up
|
||||
shell: |
|
||||
docker-compose up -d
|
||||
args:
|
||||
chdir: /opt/{{ docker_uptimekuma_service_id }}/
|
8
meta/main.yml
Normal file
8
meta/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
galaxy_info:
|
||||
author: Olivier Navas
|
||||
description: Modèle d'installation Libretic pour uptimekuma
|
||||
license: GPL-3.0-only
|
||||
min_ansible_version: 2.9
|
||||
galaxy_tags: []
|
||||
|
||||
dependencies: []
|
14
tasks/main.yml
Normal file
14
tasks/main.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- name: docker directory
|
||||
file:
|
||||
path: /opt/{{ docker_uptimekuma_service_id }}/
|
||||
state: directory
|
||||
|
||||
- name: prepare docker-compose.yml
|
||||
template:
|
||||
src: "{{ item }}"
|
||||
dest: /opt/{{ docker_uptimekuma_service_id }}/
|
||||
with_items:
|
||||
- docker-compose.yml
|
||||
notify: docker-compose-up
|
||||
|
||||
|
23
templates/docker-compose.yml
Normal file
23
templates/docker-compose.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
version: '3.1'
|
||||
|
||||
services:
|
||||
uptimekuma:
|
||||
image: louislam/uptime-kuma:{{ docker_uptimekuma_version }}
|
||||
restart: always
|
||||
volumes:
|
||||
- {{ docker_uptimekuma_data_dir }}/{{ docker_uptimekuma_service_id }}/uptimekuma:/app/data
|
||||
networks:
|
||||
- traefik
|
||||
labels:
|
||||
- "org.label-schema.group=monitoring"
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik"
|
||||
- "traefik.http.routers.{{ docker_uptimekuma_service_id }}.entrypoints=web"
|
||||
- "traefik.http.routers.{{ docker_uptimekuma_service_id }}.rule=Host(`{{ docker_uptimekuma_fqdn }}`)"
|
||||
- "traefik.http.services.{{ docker_uptimekuma_service_id }}.loadbalancer.server.port=3001"
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
Loading…
Reference in a new issue