Repos with recipes to deploy some infrastructure services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
3.1 KiB

  1. #################################################################
  2. # File: ntp.conf
  3. # Generated by: Ansible
  4. #################################################################
  5. # Allow the system clock to be stepped in the first three updates
  6. # if its offset is larger than 1 second.
  7. makestep 1.0 3
  8. # Enable kernel synchronization of the real-time clock (RTC).
  9. rtcsync
  10. # Where to log
  11. logfile {{ logfile }}
  12. # Permit all access over the loopback interface.
  13. restrict default kod nomodify notrap nopeer noquery
  14. restrict -6 default kod nomodify notrap nopeer noquery
  15. restrict 127.0.0.1
  16. restrict -6 ::1
  17. # -- CLIENT NETWORK -------
  18. # Permit systems on this network to synchronize with this
  19. # time service. Do not permit those systems to modify the
  20. # configuration of this service. Also, do not use those
  21. # systems as peers for synchronization.
  22. {% for subnet in allowed_subnets %}
  23. restrict {{ subnet.net }} mask {{ subnet.mask | default("255.255.255.0", true) }} nomodify notrap
  24. {% endfor %}
  25. # --- NTP SERVERS -----
  26. # or remove the default restrict line
  27. # Permit time synchronization with our time source, but do not
  28. # permit the source to query or modify the service on this system.
  29. {% for server in pools %}
  30. restrict {{ server }} mask 255.255.255.255 nomodify notrap noquery
  31. server {{ server }} iburst
  32. {% endfor %}
  33. # --- GENERAL CONFIGURATION ---
  34. #
  35. # Undisciplined Local Clock. This is a fake driver intended for backup
  36. # and when no outside source of synchronized time is available. The
  37. # default stratum is usually 3, but in this case we elect to use stratum
  38. # 0. Since the server line does not have the prefer keyword, this driver
  39. # is never used for synchronization, unless no other other
  40. # synchronization source is available. In case the local host is
  41. # controlled by some external source, such as an external oscillator or
  42. # another protocol, the prefer keyword would cause the local host to
  43. # disregard all other synchronization sources, unless the kernel
  44. # modifications are in use and declare an unsynchronized condition.
  45. #
  46. server 127.127.1.0
  47. fudge 127.127.1.0 stratum 10
  48. #
  49. # Drift file. Put this in a directory which the daemon can write to.
  50. # No symbolic links allowed, either, since the daemon updates the file
  51. # by creating a temporary in the same directory and then rename()ing
  52. # it to the file.
  53. # Record the rate at which the system clock gains/losses time.# Record the rate at which the system clock gains/losses time.
  54. #
  55. driftfile {{ driftfile }}
  56. #
  57. # Keys file. If you want to diddle your server at run time, make a
  58. # keys file (mode 600 for sure) and define the key number to be
  59. # used for making requests.
  60. #
  61. #
  62. # Key file containing the keys and key identifiers used when operating
  63. # with symmetric key cryptography.
  64. #
  65. {% if keyfile is defined %}
  66. keys {{ keyfile }}
  67. {% endif %}
  68. #
  69. # Disable the monitoring facility to prevent amplification attacks using ntpdc
  70. # monlist command when default restrict does not include the noquery flag. See
  71. # CVE-2013-5211 for more details.
  72. # Note: Monitoring will not be disabled with the limited restriction flag.
  73. #
  74. disable monitor