Bertrand Lanson
3d1d620edc
All checks were successful
test / Linting (push) Successful in 10s
test / Molecule tests (default, debian11) (push) Successful in 31s
test / Molecule tests (default, debian12) (push) Successful in 32s
test / Molecule tests (default, ubuntu2004) (push) Successful in 33s
test / Molecule tests (default, ubuntu2204) (push) Successful in 32s
test / Molecule tests (with_extra_sidecars, debian11) (push) Successful in 33s
test / Molecule tests (with_extra_sidecars, debian12) (push) Successful in 33s
test / Molecule tests (with_extra_sidecars, ubuntu2004) (push) Successful in 33s
test / Molecule tests (with_extra_sidecars, ubuntu2204) (push) Successful in 33s
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
---
|
|
# handlers file for deploy_adguard
|
|
- name: "Reload systemd file"
|
|
ansible.builtin.systemd:
|
|
daemon_reload: true
|
|
become: true
|
|
listen: "systemctl-daemon-reload"
|
|
|
|
- name: "Enable adguard service"
|
|
ansible.builtin.service:
|
|
name: adguard
|
|
enabled: true
|
|
become: true
|
|
listen: "systemctl-enable-adguard"
|
|
|
|
- name: "Start adguard service"
|
|
ansible.builtin.service:
|
|
name: adguard
|
|
state: restarted
|
|
become: true
|
|
listen: "systemctl-restart-adguard"
|
|
throttle: 1
|
|
when: deploy_adguard_start_service
|
|
|
|
- name: "Register/Update consul service"
|
|
ansible.builtin.command: "consul services register {{ deploy_adguard_directory }}/adguard.consul.json"
|
|
environment:
|
|
CONSUL_HTTP_ADDR: "{{ deploy_adguard_consul['consul_addr'] }}"
|
|
CONSUL_HTTP_TOKEN: "{{ deploy_adguard_consul['consul_token'] }}"
|
|
changed_when: false
|
|
listen: "consul-services-register-adguard"
|
|
|
|
- name: "Enable adguard-connect-proxy service"
|
|
ansible.builtin.service:
|
|
name: adguard-connect-proxy
|
|
enabled: true
|
|
state: restarted
|
|
become: true
|
|
listen: "systemctl-enable-restart-adguard-connect-proxy"
|