[ntp-client] On continue à PEPCRANSIFIER
parent
1d964c849b
commit
1eba54f3ec
|
@ -0,0 +1,3 @@
|
|||
glob_ntp_client:
|
||||
servers:
|
||||
- charybde.adm.crans.org
|
4
hosts
4
hosts
|
@ -76,6 +76,10 @@ fluxx.adm.crans.org
|
|||
[nginx:children]
|
||||
reverseproxy
|
||||
|
||||
[ntp_server]
|
||||
charybde.adm.crans.org
|
||||
# silice.adm.crans.org
|
||||
|
||||
[postfix]
|
||||
mailman.adm.crans.org
|
||||
redisdead.adm.crans.org
|
||||
|
|
|
@ -33,10 +33,7 @@
|
|||
# # Will be in /usr/scripts/
|
||||
# crans_scripts_git: "http://gitlab.adm.crans.org/nounous/scripts.git"
|
||||
|
||||
# NTP servers
|
||||
ntp_servers:
|
||||
- charybde.adm.crans.org
|
||||
# - silice.adm.crans.org
|
||||
ntp_client: '{{ glob_ntp_client | combine(loc_ntp_client | default({})) }}'
|
||||
roles:
|
||||
- debian-apt-sources
|
||||
- common-tools
|
||||
|
|
|
@ -7,12 +7,11 @@
|
|||
register: apt_result
|
||||
retries: 3
|
||||
until: apt_result is succeeded
|
||||
when: inventory_hostname not in ntp_servers
|
||||
when: "'ntp_server' not in group_names"
|
||||
|
||||
- name: Configure NTP
|
||||
lineinfile:
|
||||
path: /etc/systemd/timesyncd.conf
|
||||
regexp: '^NTP='
|
||||
line: "NTP={{ ntp_servers | join(' ') }}"
|
||||
template:
|
||||
src: systemd/timesyncd.conf.j2
|
||||
dest: /etc/systemd/timesyncd.conf
|
||||
notify: Restart systemd-timesyncd
|
||||
when: inventory_hostname not in ntp_servers
|
||||
when: "'ntp_server' not in group_names"
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
[Time]
|
||||
NTP={{ ntp_client.servers | join(' ') }}
|
Loading…
Reference in New Issue