Skip to content
Snippets Groups Projects
Commit 61036c2c authored by shirenn's avatar shirenn 🌊
Browse files

Merge branch 'ntp_client' into 'newinfra'

[ntp-client] On continue à PEPCRANSIFIER

See merge request !194
parents 1d964c84 1eba54f3
No related branches found
No related tags found
1 merge request!194[ntp-client] On continue à PEPCRANSIFIER
glob_ntp_client:
servers:
- charybde.adm.crans.org
...@@ -76,6 +76,10 @@ fluxx.adm.crans.org ...@@ -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 @@ ...@@ -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 @@ ...@@ -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"
[Time]
NTP={{ ntp_client.servers | join(' ') }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment