deploy_adguard/tasks/consul_service.yml

36 lines
1.1 KiB
YAML
Raw Normal View History

---
# 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'
2023-06-07 17:17:42 +00:00
notify:
- "consul-services-register-adguard"
- name: "Configure service mesh proxy"
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"