[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]
|
[nginx:children]
|
||||||
reverseproxy
|
reverseproxy
|
||||||
|
|
||||||
|
[ntp_server]
|
||||||
|
charybde.adm.crans.org
|
||||||
|
# silice.adm.crans.org
|
||||||
|
|
||||||
[postfix]
|
[postfix]
|
||||||
mailman.adm.crans.org
|
mailman.adm.crans.org
|
||||||
redisdead.adm.crans.org
|
redisdead.adm.crans.org
|
||||||
|
|
|
@ -33,10 +33,7 @@
|
||||||
# # Will be in /usr/scripts/
|
# # Will be in /usr/scripts/
|
||||||
# crans_scripts_git: "http://gitlab.adm.crans.org/nounous/scripts.git"
|
# crans_scripts_git: "http://gitlab.adm.crans.org/nounous/scripts.git"
|
||||||
|
|
||||||
# NTP servers
|
ntp_client: '{{ glob_ntp_client | combine(loc_ntp_client | default({})) }}'
|
||||||
ntp_servers:
|
|
||||||
- charybde.adm.crans.org
|
|
||||||
# - silice.adm.crans.org
|
|
||||||
roles:
|
roles:
|
||||||
- debian-apt-sources
|
- debian-apt-sources
|
||||||
- common-tools
|
- common-tools
|
||||||
|
|
|
@ -7,12 +7,11 @@
|
||||||
register: apt_result
|
register: apt_result
|
||||||
retries: 3
|
retries: 3
|
||||||
until: apt_result is succeeded
|
until: apt_result is succeeded
|
||||||
when: inventory_hostname not in ntp_servers
|
when: "'ntp_server' not in group_names"
|
||||||
|
|
||||||
- name: Configure NTP
|
- name: Configure NTP
|
||||||
lineinfile:
|
template:
|
||||||
path: /etc/systemd/timesyncd.conf
|
src: systemd/timesyncd.conf.j2
|
||||||
regexp: '^NTP='
|
dest: /etc/systemd/timesyncd.conf
|
||||||
line: "NTP={{ ntp_servers | join(' ') }}"
|
|
||||||
notify: Restart systemd-timesyncd
|
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