Browse Source

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 years ago
parent
commit
ae2e74bb79
4 changed files with 27 additions and 5 deletions
  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 View File

10
 filegen peerstats file peerstats type day enable
10
 filegen peerstats file peerstats type day enable
11
 filegen clockstats file clockstats type day enable
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
 # fallback
18
 # fallback
20
 server tick.usno.navy.mil
19
 server tick.usno.navy.mil

+ 8
- 0
vars/defaults.yml View File

12
 friendly_networks:
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
 # database
23
 # database
16
 db_admin_username: 'postgres'
24
 db_admin_username: 'postgres'
17
 # db_admin_password: (required)
25
 # db_admin_password: (required)

+ 6
- 0
vars/testing.yml View File

14
 db_admin_username: postgres
14
 db_admin_username: postgres
15
 db_admin_password: postgres
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
 # ircbouncer
23
 # ircbouncer
18
 irc_nick: sovereign
24
 irc_nick: sovereign
19
 irc_ident: sovereign
25
 irc_ident: sovereign

+ 9
- 0
vars/user.yml View File

9
 main_user_name: TODO
9
 main_user_name: TODO
10
 encfs_password: TODO
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
 # database
21
 # database
13
 db_admin_username: postgres
22
 db_admin_username: postgres
14
 db_admin_password: TODO
23
 db_admin_password: TODO

Loading…
Cancel
Save