diff options
| author | Ahmed Abdelhalim <[email protected]> | 2025-09-10 17:52:58 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2025-09-10 17:52:58 +0200 |
| commit | e9e609e89ad879e10e58f2c4fcfa572f60d6dfad (patch) | |
| tree | 6353c98fa1b6ad69c21931ac299e8522f48c645f /roles/pihole | |
| parent | a5983fd890fc94650e9cc0b890220931ad3b3a88 (diff) | |
Refactor role dependencies to be more module modular
This modularity means that each role can be installed in a playbook by
itself as long as the other roles exist around it.
This also straps the ensure dependency packages exist in any of the
roles tasks, they should be moved to their own roles and configured
properly if needed.
Diffstat (limited to 'roles/pihole')
| -rw-r--r-- | roles/pihole/handlers/main.yml | 6 | ||||
| -rw-r--r-- | roles/pihole/meta/main.yml | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/roles/pihole/handlers/main.yml b/roles/pihole/handlers/main.yml index dca1ef52..e95e4fae 100644 --- a/roles/pihole/handlers/main.yml +++ b/roles/pihole/handlers/main.yml @@ -1,15 +1,15 @@ --- - name: "Restart pihole" - ansible.builtin.systemd_service: + ansible.builtin.systemd: name: "pihole-FTL" state: "restarted" - name: "Restart systemd-resolved" - ansible.builtin.systemd_service: + ansible.builtin.systemd: name: "systemd-resolved" state: "restarted" - name: "Restart NetworkManager" - ansible.builtin.systemd_service: + ansible.builtin.systemd: name: "NetworkManager" state: "restarted" diff --git a/roles/pihole/meta/main.yml b/roles/pihole/meta/main.yml index 59be9d68..7708f945 100644 --- a/roles/pihole/meta/main.yml +++ b/roles/pihole/meta/main.yml @@ -1,5 +1,7 @@ --- -dependencies: [] +dependencies: + - role: "network" + - role: "systemd" galaxy_info: author: "a14m" description: "Configure pihole on supported devices" |
