maxhoesel.ddclient

maxhoesel.ddclient

This is a simple role for installing and setting up ddclient from GitHub. It also creates a systemd service to run ddclient in daemon mode.

Requirements

  • You need a recent version of Ansible. This role works with the last two major versions of Ansible. Older ones might work but aren't supported.
  • The host must run:
    • Ubuntu 18.04 LTS or newer
    • Debian 10 or newer
    • Other Linux distributions may work but are not supported (You can add support by making a pull request!)

Role Variables

Installation

ddclient_version
  • The version of ddclient to install.
  • Can be a branch, tag, or commit from git.
  • Default: develop
ddclient_executable_path
  • Where to install the ddclient executable.
  • Default is /usr/local/sbin/ddclient to avoid conflicts with system packages.
ddclient_configfile
  • Configuration file for ddclient.
  • Default: /etc/ddclient.conf
ddclient_pidfile
  • PID file for the ddclient daemon.
  • Default: /var/run/ddclient.pid
ddclient_systemd_unit
  • The name of the unit file for the ddclient daemon.
  • Default: ddclient

Configuration

ddclient_interval
  • Wait time in seconds between DynDNS IP checks.
  • Default: 300
ddclient_mail
  • Email address to send updates.
  • Default: root
ddclient_mail_failure
  • Email address to send failure notices.
  • Default: root
ddclient_entries
  • List of configuration entries for ddclient.
  • Each entry has options and domains associated.
    • Options match directly to ddclient settings.
  • Example:
    - options:
        protocol: cloudflare
        zone: domain.tld
        ttl: 60
        login: your-login-email
        password: APIKey
      domains:
        - domain.tld
        - my.domain.tld
    

IP Lookup

Settings to define how ddclient gets the IP addresses for DynDNS updates. By default, all these settings are unset, meaning ddclient will use its default methods.

NOTE: Most of the following settings can be configured for IPv4 and IPv6.

ddclient_strategy_usev[4/6]
  • Set the method to find the IPv4 or IPv6 address for updates.
  • Options include: webv[4/6], if[4/6], ip[4/6], fw, cmd
  • Default: not defined
ddclient_strategy_ipv[4/6]
  • Set a fixed IP using the ip method.
  • Default: not defined
ddclient_strategy_ifv[4/6]
  • Get the IP from a specific network interface using the if method.
  • Default: not defined
ddclient_strategy_webv[4/6]
  • Use a web service to get the IPv4 address, either from a known service or a custom URL.
  • Default: not defined
ddclient_strategy_webv[4/6]_skip
  • Refer to ddclient documentation.
  • Default: not defined
ddclient_strategy_fwv[4/6]
  • Get the IP from a device at a specific IP address or URL.
  • Default: not defined
ddclient_strategy_fwv[4/6]_skip
  • Ignore IPs before a specific pattern in the returned text.
  • Default: not defined
ddclient_strategy_fw_login
  • Login to use when getting the IP from the device.
  • Default: not defined
ddclient_strategy_fw_password
  • Password to use when getting the IP from the device.
  • Default: not defined
ddclient_strategy_cmdv[4/6]
  • Get the IPv4 address from the output of this command.
  • Default: not defined

Example Playbook

- hosts: all
  tasks:
    - name: Install ddclient
      include_role:
        name: maxhoesel.ddclient
      vars:
        ddclient_entries:
        - options:
            protocol: cloudflare
            zone: domain.tld
            ttl: 1 # automatic
            login: your-login-email
            password: APIKey
          domains:
            - domain.tld
            - my.domain.tld
        # Find the IPv4 address using dyndns
        ddclient_strategy_usev4: webv4
        ddclient_strategy_webv4: dyndns
        # Get the IPv6 address from eth0
        ddclient_strategy_usev6: ifv6
        ddclient_strategy_ifv6: eth0

License

GPL 3 or later

Author Information

Created and maintained by Max Hösel (@maxhoesel)

Informazioni sul progetto

Installs and configures ddclient

Installa
ansible-galaxy install maxhoesel.ddclient
Licenza
Unknown
Download
71.9k
Proprietario
Junior Automation and Infrastructure Engineer, Bachelor in CompSci. I write Ansible content and DevOps-related tools, mostly in Rust