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.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# Ansible Role: ddclient
|
# Ansible Role: ddclient
|
||||||
|
|
||||||
Installs and configures ddclient for dynamic DNS updates.
|
Installs ddclient, writes `/etc/ddclient.conf` and `/etc/default/ddclient`, and ensures the `ddclient` service is enabled and running.
|
||||||
|
|
||||||
## Example Playbook
|
## Example Playbook
|
||||||
|
|
||||||
@@ -59,6 +59,8 @@ Only applicable if using the IP detection method `fw`.
|
|||||||
|
|
||||||
### Protocol Configuration
|
### Protocol Configuration
|
||||||
|
|
||||||
|
`ddclient_protocols` is a list of DDNS provider entries. Defaults to `[]` — the role runs to completion but ddclient will have no updates to perform until you set it.
|
||||||
|
|
||||||
**Common keys:**
|
**Common keys:**
|
||||||
|
|
||||||
| Key | Required | Description |
|
| Key | Required | Description |
|
||||||
|
|||||||
@@ -19,3 +19,9 @@
|
|||||||
owner: root
|
owner: root
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
notify: Restart ddclient service
|
notify: Restart ddclient service
|
||||||
|
|
||||||
|
- name: Ensure ddclient service is enabled and running
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: ddclient
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
|||||||
Reference in New Issue
Block a user