Преглед на файлове

make NTP pool configurable

use the world-wide pool by default, but specify north-america in
user.yml. Also, documentation. This way Sovereign will still behave the
same, but the NTP servers can be changed when desired.
Joost Baaij преди 11 години
родител
ревизия
ae2e74bb79
променени са 4 файла, в които са добавени 27 реда и са изтрити 5 реда
  1. 4
    5
      roles/common/templates/ntp.conf.j2
  2. 8
    0
      vars/defaults.yml
  3. 6
    0
      vars/testing.yml
  4. 9
    0
      vars/user.yml

+ 4
- 5
roles/common/templates/ntp.conf.j2 Целия файл

@@ -10,11 +10,10 @@ filegen loopstats file loopstats type day enable
10 10
 filegen peerstats file peerstats type day enable
11 11
 filegen clockstats file clockstats type day enable
12 12
 
13
-# Use servers from the NTP Pool Project
14
-server 0.north-america.pool.ntp.org
15
-server 1.north-america.pool.ntp.org
16
-server 2.north-america.pool.ntp.org
17
-server 3.north-america.pool.ntp.org
13
+# Use servers configured via Ansible
14
+{% for server in ntp_servers %}
15
+server {{ server }}
16
+{% endfor %}
18 17
 
19 18
 # fallback
20 19
 server tick.usno.navy.mil

+ 8
- 0
vars/defaults.yml Целия файл

@@ -12,6 +12,14 @@ admin_email: "{{ main_user_name }}@{{ domain }}"
12 12
 friendly_networks:
13 13
   - ""
14 14
 
15
+# ntp
16
+ntp_servers:
17
+  # use a random selection of worldwide servers by default.
18
+  - 0.pool.ntp.org
19
+  - 1.pool.ntp.org
20
+  - 2.pool.ntp.org
21
+  - 3.pool.ntp.org
22
+
15 23
 # database
16 24
 db_admin_username: 'postgres'
17 25
 # db_admin_password: (required)

+ 6
- 0
vars/testing.yml Целия файл

@@ -14,6 +14,12 @@ friendly_networks:
14 14
 db_admin_username: postgres
15 15
 db_admin_password: postgres
16 16
 
17
+ntp_servers:
18
+  - 0.north-america.pool.ntp.org
19
+  - 1.north-america.pool.ntp.org
20
+  - 2.north-america.pool.ntp.org
21
+  - 3.north-america.pool.ntp.org
22
+
17 23
 # ircbouncer
18 24
 irc_nick: sovereign
19 25
 irc_ident: sovereign

+ 9
- 0
vars/user.yml Целия файл

@@ -9,6 +9,15 @@ domain: TODO.com
9 9
 main_user_name: TODO
10 10
 encfs_password: TODO
11 11
 
12
+# ntp
13
+ntp_servers:
14
+  # preferably, use the ntp servers in your own country or continent
15
+  # See http://www.pool.ntp.org/en/use.html
16
+  - 0.north-america.pool.ntp.org
17
+  - 1.north-america.pool.ntp.org
18
+  - 2.north-america.pool.ntp.org
19
+  - 3.north-america.pool.ntp.org
20
+
12 21
 # database
13 22
 db_admin_username: postgres
14 23
 db_admin_password: TODO

Loading…
Отказ
Запис