made it more robust and import global handlers in all roles

This commit is contained in:
2025-10-21 15:17:31 +02:00
parent 35fdf5782b
commit e0636feb5f
2 changed files with 87 additions and 71 deletions

View File

@@ -55,12 +55,16 @@
# run roles
- hosts: all
handlers:
- import_tasks: global_handlers/global_handlers.yml
tags: base
become: true
roles:
- base
# - hosts: workstation
# handlers:
# - import_tasks: global_handlers/global_handlers.yml
# tags: workstation
# become: true
# roles:
@@ -71,6 +75,8 @@
become: true
roles:
- server
handlers:
- import_tasks: global_handlers/global_handlers.yml
- hosts: bastionhost
tags: server,bastionhost
@@ -88,6 +94,8 @@
- hosts: nameserver
tags: server,nameserver
handlers:
- import_tasks: global_handlers/global_handlers.yml
become: true
roles:
- nameserver
@@ -95,18 +103,24 @@
- hosts: webservers
tags: server,webservers
become: true
handlers:
- import_tasks: global_handlers/global_handlers.yml
roles:
- webservers
- hosts: mailserver
tags: server,mailserver
become: true
handlers:
- import_tasks: global_handlers/global_handlers.yml
roles:
- mailserver
- hosts: database
tags: server,database
become: true
handlers:
- import_tasks: global_handlers/global_handlers.yml
roles:
- database
@@ -118,6 +132,8 @@
- hosts: docker
tags: server,docker
handlers:
- import_tasks: global_handlers/global_handlers.yml
become: true
roles:
- docker
@@ -125,6 +141,8 @@
- hosts: drone
tags: server,docker,drone
become: true
handlers:
- import_tasks: global_handlers/global_handlers.yml
roles:
- drone
@@ -136,6 +154,8 @@
- hosts: mastodon
tags: server,mastodon
handlers:
- import_tasks: global_handlers/global_handlers.yml
become: true
roles:
- mastodon
@@ -148,6 +168,8 @@
- hosts: jitsimeet
tags: server,jitsimeet,webservers
handlers:
- import_tasks: global_handlers/global_handlers.yml
become: true
roles:
- jitsimeet
@@ -155,12 +177,16 @@
- hosts: omada_controller
tags: server,omada_controller
become: true
handlers:
- import_tasks: global_handlers/global_handlers.yml
roles:
- omada-controller
- hosts: backup
tags: server,backup
become: true
handlers:
- import_tasks: global_handlers/global_handlers.yml
roles:
- backup