files:
  debian.installation.!standalone::
                /etc/ntp.conf owner=root group=root mode=644 act=touch

editfiles:
  debian.!standalone.installation::
    { /etc/ntp.conf
        AppendIfNoSuchLine "# /etc/ntp.conf, configuration for xntpd"
        AppendIfNoSuchLine "# ntpd will use syslog() if logfile is not defined"
        AppendIfNoSuchLine "#logfile /var/log/ntpd"
        AppendIfNoSuchLine "driftfile /var/lib/ntp/ntp.drift"
        AppendIfNoSuchLine "statsdir /var/log/ntpstats/"
        AppendIfNoSuchLine "statistics loopstats peerstats clockstats"
        AppendIfNoSuchLine "filegen loopstats file loopstats type day enable"
        AppendIfNoSuchLine "filegen peerstats file peerstats type day enable"
        AppendIfNoSuchLine "filegen clockstats file clockstats type day enable"
    }

  # Add local clock on the main-server to ensure clients can sync with
  # the main-server even when all the machines are disconnected from
  # the Internet.  When they are on the Internet, all will sync with
  # pool.ntp.org machines.
  debian.server.installation::
    { /etc/ntp.conf
        AppendIfNoSuchLine "server 127.127.1.0"
    }

  debian.!server.!standalone.installation::
    { /etc/ntp.conf
        AppendIfNoSuchLine "server ntp iburst"
    }

  # Remove all ntp servers except 'ntp' (aka tjener) from ntp.conf.
  debian.ltspclient.installation::
    { /etc/ntp.conf
        CommentLinesMatching ".*debian.pool.ntp.*"
    }
