Punt NTP and use Chrony.
authorMatt Birkholz <matt@birchwood-abbey.net>
Thu, 18 Sep 2025 21:01:28 +0000 (15:01 -0600)
committerMatt Birkholz <matt@birchwood-abbey.net>
Thu, 18 Sep 2025 21:01:28 +0000 (15:01 -0600)
README.org
roles_t/core/handlers/main.yml
roles_t/core/tasks/main.yml

index 7af2eb8f194452c11b4d942a9fd60fc3c28a32d8..62e49555e9360e42f74243c201fbb2f46f009286 100644 (file)
@@ -2917,17 +2917,36 @@ themselves to institute clients.  They share the =/etc/server.crt= and
   - Restart Dovecot.
 #+END_SRC
 
-** Install NTP
+** Install Chrony
 
-Core uses NTP to provide a time synchronization service to the campus.
+Core uses Chrony to provide a time synchronization service to the campus.
 The default daemon's default configuration is fine.
 
 #+CAPTION: [[file:roles_t/core/tasks/main.yml][=roles_t/core/tasks/main.yml=]]
 #+BEGIN_SRC conf :tangle roles_t/core/tasks/main.yml :noweb no-export
 
-- name: Install NTP.
+- name: Install Chrony.
   become: yes
-  apt: pkg=ntp
+  apt: pkg=chrony
+
+- name: Configure NTP service.
+  become: yes
+  copy:
+    content: |
+      allow {{ private_net_cidr }}
+      allow {{ public_wg_net_cidr }}
+      allow {{ campus_wg_net_cidr }}
+    dest: /etc/chrony/conf.d/institute.conf
+  notify: Restart Chrony.
+#+END_SRC
+
+#+CAPTION: [[file:roles_t/core/handlers/main.yml][=roles_t/core/handlers/main.yml=]]
+#+BEGIN_SRC conf :tangle roles_t/core/handlers/main.yml :noweb no-export
+
+- name: Restart Chrony.
+  systemd:
+    service: chrony
+    state: restarted
 #+END_SRC
 
 ** Configure Postfix on Core
index ad8d3416f43f8133da3e43fcf8bb67544f15a90f..7e7eda4e1d1eb291d27ebc3ddae11d94f3b1ca36 100644 (file)
     state: reloaded
   tags: actualizer
 
+- name: Restart Chrony.
+  systemd:
+    service: chrony
+    state: restarted
 
 - name: Restart Postfix.
   become: yes
index bdc99ea811ea8261cedb1858e0395380dc6231c7..375b76325f5255bca35e2cdec5036f0128219b70 100644 (file)
   - Restart Postfix.
   - Restart Dovecot.
 
-- name: Install NTP.
+- name: Install Chrony.
   become: yes
-  apt: pkg=ntp
+  apt: pkg=chrony
+
+- name: Configure NTP service.
+  become: yes
+  copy:
+    content: |
+      allow {{ private_net_cidr }}
+      allow {{ public_wg_net_cidr }}
+      allow {{ campus_wg_net_cidr }}
+    dest: /etc/chrony/conf.d/institute.conf
+  notify: Restart Chrony.
 
 - name: Install Postfix.
   become: yes