Files
ansible-role-ddclient/tasks/main.yaml
T
patrick e225530db9 ensure ddclient service is running; default protocols to []
- Add an explicit service state=started enabled=true task so the role is self-healing if the unit is disabled or stopped, rather than relying solely on the restart handler.
- Default ddclient_protocols to [] so the template's for-loop no longer errors when the var is omitted.
- README: note service management in the tagline and document the new ddclient_protocols default.
2026-06-24 21:45:05 -04:00

28 lines
664 B
YAML
Executable File

---
- name: Install ddclient
ansible.builtin.package:
name: ddclient
state: latest
- name: Copy over main ddclient configuration file
ansible.builtin.template:
src: "../templates/ddclient.conf.j2"
dest: /etc/ddclient.conf
owner: root
mode: "0600"
notify: Restart ddclient service
- name: Copy over ddclient service configuration
ansible.builtin.template:
src: "../templates/ddclient.j2"
dest: /etc/default/ddclient
owner: root
mode: "0600"
notify: Restart ddclient service
- name: Ensure ddclient service is enabled and running
ansible.builtin.service:
name: ddclient
state: started
enabled: true