deploy_adguard/tasks/configure.yml

43 lines
1.2 KiB
YAML
Raw Normal View History

2023-05-28 22:06:27 +00:00
---
# task/configure file for deploy_adguard
2023-05-29 20:20:10 +00:00
- name: "Copy adguard.service file"
ansible.builtin.template:
src: "adguard.service.j2"
dest: "/etc/systemd/system/adguard.service"
owner: root
group: root
mode: '0644'
2023-05-30 18:23:27 +00:00
notify:
2023-05-31 20:05:56 +00:00
- systemctl-daemon-reload
2023-05-29 20:20:10 +00:00
- 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
2023-05-29 20:20:10 +00:00
- name: "Copy AdGuardHome.yaml"
ansible.builtin.template:
src: "AdGuardHome.yaml.j2"
dest: "{{ deploy_adguard_directory }}/conf/AdGuardHome.yaml"
owner: root
group: root
mode: '0600'
2023-05-31 20:57:46 +00:00
when: deploy_adguard_config != {}
2023-05-30 18:23:27 +00:00
notify:
2023-05-31 20:05:56 +00:00
- systemctl-restart-adguard