Compare commits

...

2 Commits

Author SHA1 Message Date
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
patrick 9057c453ad fix: wire up exec, fw auth vars, and prune dead detection keys
- Template now emits `exec=` so ddclient_exec actually toggles dry-run (was documented and defaulted but never written to the config).
- Rename fw_login/fw_password defaults to ddclient_fw_login/ddclient_fw_password to match what the template reads; previous names were silently dead.
- Drop unused address/interface/command/skip keys from the ddclient_ipv{4,6}_detection defaults — the template only reads method/source/skip_pattern. Fix the `# Method:` comments to list the v4/v6-suffixed names actually in use.
2026-06-24 21:42:25 -04:00
4 changed files with 19 additions and 15 deletions
+3 -1
View File
@@ -1,6 +1,6 @@
# 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
@@ -59,6 +59,8 @@ Only applicable if using the IP detection method `fw`.
### 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:**
| Key | Required | Description |
+9 -14
View File
@@ -28,21 +28,16 @@ ddclient_postscript: "" # Script to run after update
# IP Detection configuration
ddclient_ipv4_detection:
method: webv4 # Method: ip, if, web, fw, cmd
source: dyndns # Source for web/fw methods
address: "" # IP address for method=ip
interface: "" # Network interface (for method=if)
command: "" # Command to run (for method=cmd)
skip: "" # Pattern to skip in output
method: webv4 # Method: ipv4, ifv4, webv4, fwv4, cmdv4
source: dyndns # URL / interface / command / IP, depending on method
ddclient_ipv6_detection:
method: webv6 # Method: ip, if, web, fw, cmd
source: dyndns # Source for web/fw methods
address: "" # IP address for method=ip
interface: "" # Network interface (for method=if)
command: "" # Command to run (for method=cmd)
skip: "" # Pattern to skip in output
method: webv6 # Method: ipv6, ifv6, webv6, fwv6, cmdv6
source: dyndns # URL / interface / command / IP, depending on method
fw_login: "" # Firewall login (for method=fw)
fw_password: "" # Firewall password (for method=fw)
ddclient_fw_login: "" # Firewall login (for method=fw)
ddclient_fw_password: "" # Firewall password (for method=fw)
# DDNS providers to update
ddclient_protocols: []
+6
View File
@@ -19,3 +19,9 @@
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
+1
View File
@@ -48,6 +48,7 @@ debug={{ ddclient_debug | ternary('yes', 'no') }}
# ============================================================
# Update Behavior
# ============================================================
exec={{ ddclient_exec | ternary('yes', 'no') }}
retry={{ ddclient_retry | ternary('yes', 'no') }}
force={{ ddclient_force | ternary('yes', 'no') }}
{% if ddclient_postscript %}