deploy_adguard/tasks/configure.yml
Bertrand Lanson 0b0fc6673e
All checks were successful
test / Linting (push) Successful in 39s
test / Molecule tests (default, debian12) (push) Successful in 58s
test / Molecule tests (default, debian11) (push) Successful in 1m22s
test / Molecule tests (default, ubuntu2004) (push) Successful in 59s
test / Molecule tests (default, ubuntu2204) (push) Successful in 58s
test / Molecule tests (with_extra_sidecars, debian11) (push) Successful in 53s
test / Molecule tests (with_extra_sidecars, debian12) (push) Successful in 1m6s
test / Molecule tests (with_extra_sidecars, ubuntu2004) (push) Successful in 39s
test / Molecule tests (with_extra_sidecars, ubuntu2204) (push) Successful in 33s
feat: emove become from role
2023-12-03 16:51:47 +01:00

47 lines
1.3 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-enable-adguard
- systemctl-restart-adguard
- name: "Create password file for node-exporter"
ansible.builtin.copy:
dest: "{{ deploy_adguard_directory }}/password"
content: "{{ deploy_adguard_node_exporter['password'] }}"
owner: root
group: root
mode: '0600'
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