Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • v1.0.0
2 results

README.md

Blame
  • Chris Coley's avatar
    Chris Coley authored
    All role variables are now prefixed with 'ntp__' instead of 'ntp_', and internal
    variables are additionally prefixed with '_'. So variables meant to be used in
    playbooks are named 'ntp__variable_name' and variables only meant for internal
    use are named '_ntp__internal_variable_name'.
    91bdae96
    History

    NTP

    Installs and configures the NTP service.

    Requirements

    This role requires Ansible 2.4 or higher.

    Role Variables

    If you're only trying to set up a host as a NTP client, then you can stick with the defaults. You may want to update the ntp__pools variable to point to a closer pool, but you don't have to. Most of the other variables are only relevant if you're setting up a NTP server.

    Variable Default Purpose
    ntp__enabled true Asserts whether the NTP sevice should be enabled and start at boot.
    ntp__server false Asserts whether the host should be configured to respond to time requests.
    ntp__logging false Asserts whether logging should be enabled.
    ntp__sync_now false Asserts whether the NTP service should immediately sync with its configured time servers, without regard to "easing", or errors potentially caused by "jumps" in time.
    ntp__restrict ['127.0.0.1', '::1'] Additional access restrictions. We already define secure defaults based on the value of ntp__server. Any additional ntp__restrict entries are likely to allow more access.
    ntp__servers [] A list of NTP servers to query for time. It's recommended to use ntp__pools, but we support declaring specific servers too for backwards compatibility.
    ntp__pools [pool.ntp.org] A list of NTP pool addresses. Using 1 pool is fine, and will result in multiple actual servers being used.
    ntp__peers [] A list of NTP servers to peer with. You will have to add the appropriate ntp__restrict entries to allow peering.

    Example Playbook

    This is the basic way to use this role. It will install the NTP service, enable it to start at boot, and configure it to use the us.pool.ntp.org public NTP pool.

    - hosts: servers
      roles:
        - { role: ntp, ntp__pools: [us.pool.ntp.org] }