43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
---
|
|
# task/configure file for deploy_adguard
|
|
- name: "Copy adguard.service file"
|
|
ansible.builtin.template:
|
|
src: "adguard.service.j2"
|
|
dest: "/etc/systemd/system/adguard.service"
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
notify:
|
|
- systemctl-daemon-reload
|
|
|
|
- name: "Configure docker-compose deployment"
|
|
block:
|
|
- name: "Copy docker-compose.yml template"
|
|
ansible.builtin.template:
|
|
src: "docker-compose.yml.j2"
|
|
dest: "{{ deploy_adguard_directory }}/docker-compose.yml"
|
|
owner: root
|
|
group: root
|
|
mode: '0600'
|
|
notify:
|
|
- systemctl-restart-adguard
|
|
|
|
- name: "Create password file for node-exporter"
|
|
ansible.builtin.copy:
|
|
dest: "{{ deploy_adguard_directory }}/password"
|
|
content: "{{ deploy_adguard_node_exporter['password'] }}"
|
|
when: deploy_adguard_node_exporter['enable']
|
|
notify:
|
|
- systemctl-restart-adguard
|
|
|
|
- name: "Copy AdGuardHome.yaml"
|
|
ansible.builtin.template:
|
|
src: "AdGuardHome.yaml.j2"
|
|
dest: "{{ deploy_adguard_directory }}/conf/AdGuardHome.yaml"
|
|
owner: root
|
|
group: root
|
|
mode: '0600'
|
|
when: deploy_adguard_config != {}
|
|
notify:
|
|
- systemctl-restart-adguard
|