Compare commits

...

5 Commits

7 changed files with 49 additions and 6 deletions

4
.gitignore vendored
View File

@@ -5,6 +5,8 @@
.ansible_cache
.ansible_check_mode
fact_cache/
*galaxy_cache/
*galaxy_token
# --- ROLES & COLLECTIONS ---
# On ignore les rôles téléchargés depuis Galaxy (ils sont définis dans requirements.yml)
@@ -47,4 +49,4 @@ __pycache__/
.idea/
.vscode/
*.swp
*.swo
*.swo

View File

@@ -31,3 +31,8 @@ Use "ansible-vault view" to read the decrypted content of vault file without mod
> ansible-vault edit ansible/vars/vault.yml
## Ansible Galaxy Collections
- lucasheld.uptime_kuma [https://galaxy.ansible.com/ui/repo/published/lucasheld/uptime_kuma/]

View File

@@ -10,22 +10,23 @@ pve1 ansible_host=192.168.1.251
pve2 ansible_host=192.168.1.253
pve3 ansible_host=192.168.1.252
[pve-tools]
[pve_tools]
pdm ansible_host=192.168.1.189
pbs ansible_host=192.168.1.91
[dns-server]
[dns_server]
pihole ansible_host=192.168.1.9
ns1 ansible_host=192.168.1.8
ns2 ansible_host=192.168.1.7
[dhcp-server]
[dhcp_server]
dhcp ansible_host=192.168.1.5
[web-service]
[web_service]
observatoire ansible_host=192.168.1.61
nginx ansible_host=192.168.1.201
ncloud ansible_host=192.168.1.239
futurenuage ansible_host=192.168.1.168
[vpn]
vypyhaine ansible_host=192.168.1.97
@@ -33,4 +34,4 @@ vypyhaine ansible_host=192.168.1.97
[kubernetes]
k3s-master ansible_host=192.168.1.10
k3s-worker-1 ansible_host=192.168.1.11
k3s-worker-2 ansible_host=192.168.1.12
k3s-worker-2 ansible_host=192.168.1.12

5
playbook/uptime-kuma.yml Normal file
View File

@@ -0,0 +1,5 @@
---
- name: uptime_kuma playbook
hosts: all
roles:
- uptime-kuma

View File

@@ -0,0 +1,14 @@
---
- name: Charger les secrets du Vault
include_vars:
file: vault.yml # Il cherchera par défaut dans le dossier vars/ du rôle
- name: Login by token and create a monitor
lucasheld.uptime_kuma.monitor:
api_url: "{{ api_url }}"
api_token: "{{ uptime_kuma_api_key }}"
name: "{{ host_name }}"
type: ping
url: "{{ url }}"
state: present
...

View File

@@ -0,0 +1,7 @@
---
domain_name: teyssier.lan
host_name: futurenuage
uptime_kuma_host: "uptime-kuma.{{ domain_name }}"
url: nc.teyssier.lan
api_url: "https://{{ uptime_kuma_host }}"
uptime_kuma_api_key: "{{ secret_uptime_kuma_api_key }}"

View File

@@ -0,0 +1,9 @@
$ANSIBLE_VAULT;1.1;AES256
31646463313736336435343930383232376132366237383439373964353432306234346265646235
3131306234316163373663643666636630326565373731330a333562356437613566313562373831
63613064303764663833643662653036386530613734316537383638663563633463393164346666
6465343462666438350a393433636561623633653761643939306165303930376138643364633565
61303137313931356439663232623138396464353434333434343461663238643464633861626634
35333161653933643939306265313736616634353562326437663461656232316137623365613761
37663035666134646237386134646132663936323130333265643235343531346465306666323762
33323362643534323934