/ansible-openntpd

An Ansible role which installs and configures OpenNTPd

MIT LicenseMIT

openntpd

Build Status

An Ansible role which installs and configures OpenNTPd

Requirements

Currently this role is developed for and tested on Debian GNU/Linux (release: stretch). It is assumed to work on other Debian distributions as well.

Ansible version compatibility: Dockerfile

Example

---

- hosts: "all"
  vars:
    openntpd_config_options:
      listen_on:
        any:
          address: "*"
      servers:
        ptbtim1.ptb.de:
          address: "ptbtime1.ptb.de"
        ptbtime2.ptb.de:
          address: "ptbtime2.ptb.de"
        ptbtime3.ptb.de:
          address: "ptbtime3.ptb.de"
  roles:
    - role: "ansible-openntpd"
      tags:
        - "openntpd"
  post_tasks:
    - block:
        - include: "tests/test_ntpctl_show_all_data.yml"
      tags:
        - "tests"

Defaults

Available variables are listed below, along with default values (see defaults/main.yml). They're generally prefixed with openntpd_ (which I deliberately leave out here for better formatting).

variable default notes
cache_valid_time 3600 Update the apt cache if its older than the set value (in seconds)
config_file /etc/openntpd/ntpd.conf Absolute path to openntpd's configuration file
default_release {{ ansible_distribution_release|lower }} The default release to install packages from
package_list ['openntpd'] The list of packages to be installed
pre_default_release {{ openntpd_default_release }} The default release to install packages (pre_package_list) from
pre_package_list ['apt-transport-https','ca-certificates'] The list of prerequisite packages to be installed
repo_list [] (additional) repository list
service_name openntpd Name of the (openntpd) service
supported_distro_list ['stretch'] A list of distribution releases this role supports
update_cache yes Run the equivalent of apt-get update before the operation

Dependencies

None

License

MIT

Author Information

  • Patrick Ringl