deploy_adguard/tasks/consul_service.yml
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
feat: add become, add vagrant tests, fix #1
2023-12-02 17:25:56 +01:00

38 lines
1.2 KiB
YAML

---
# task/consul_service file for deploy_adguard
- name: "Copy adguard.consul.json file"
ansible.builtin.template:
src: "adguard.consul.json.j2"
dest: "{{ deploy_adguard_directory }}/adguard.consul.json"
owner: root
group: root
mode: '0644'
become: true
notify:
- "consul-services-register-adguard"
- name: "Configure service mesh proxy"
become: true
when: deploy_adguard_consul['configuration']['service']['connect'] is defined
block:
- name: "Copy adguard-connect-proxy.env file"
ansible.builtin.template:
src: "adguard-connect-proxy.env.j2"
dest: "{{ deploy_adguard_directory }}/adguard-connect-proxy.env"
owner: root
group: root
mode: '0644'
notify:
- "systemctl-enable-restart-adguard-connect-proxy"
- name: "Copy adguard-connect-proxy.service file"
ansible.builtin.template:
src: "adguard-connect-proxy.service.j2"
dest: "/etc/systemd/system/adguard-connect-proxy.service"
owner: root
group: root
mode: '0644'
notify:
- "systemctl-daemon-reload"
- "systemctl-enable-restart-adguard-connect-proxy"