added handlers + readme typo

This commit is contained in:
Bertrand Lanson 2023-05-31 22:05:56 +02:00
parent 55ff75a4ba
commit 277475be39
4 changed files with 23 additions and 4 deletions

View File

@ -1,4 +1,4 @@
Deplou AdGuard
Deploy AdGuard
=========
> This repository is only a mirror. Development and testing is done on a private gitlab server.

View File

@ -8,6 +8,7 @@ deploy_adguard_enable_doh: true
deploy_adguard_enable_dot: false
deploy_adguard_enable_doq: false
deploy_adguard_enable_dnscrypt: false
deploy_adguard_start_service: false
deploy_adguard_virtual_ip:
enable: false
interface: eth0

View File

@ -1,2 +1,20 @@
---
# handlers file for deploy_adguard
- name: "Reload systemd file"
ansible.builtin.systemd:
daemon_reload: true
listen: "systemctl-daemon-reload"
- name: "Enable consul service"
ansible.builtin.service:
name: adguard
enabled: true
listen: "systemctl-enable-adguard"
- name: "Start consul service"
ansible.builtin.service:
name: adguard
state: restarted
listen: "systemctl-restart-adguard"
throttle: 1
when: deploy_adguard_start_service

View File

@ -8,7 +8,7 @@
group: root
mode: '0644'
notify:
- systemctl_daemon_reload
- systemctl-daemon-reload
- name: "Copy docker-compose.yml template"
ansible.builtin.template:
@ -18,7 +18,7 @@
group: root
mode: '0600'
notify:
- systemctl_restart_adguard
- systemctl-restart-adguard
- name: "Copy AdGuardHome.yaml"
ansible.builtin.template:
@ -29,4 +29,4 @@
mode: '0600'
when: deploy_adguard_config is not empty
notify:
- systemctl_restart_adguard
- systemctl-restart-adguard