Skip to content
Snippets Groups Projects
Commit 1f16f7df authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Handle Debian in NTP setup (refs #27160).

parent 578a4dca
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import subprocess
import utils import utils
...@@ -11,7 +12,17 @@ def setup(interactive=True): ...@@ -11,7 +12,17 @@ def setup(interactive=True):
if server.strip(): if server.strip():
servers += 'pool %s\n' % server.strip() servers += 'pool %s\n' % server.strip()
if not servers: if not servers:
servers = 'pool ntp.ubuntu.com\n' if 'Ubuntu' in subprocess.getoutput('lsb_release -a'):
servers += 'pool 0.ubuntu.pool.ntp.org iburst\n'
servers += 'pool 1.ubuntu.pool.ntp.org iburst\n'
servers += 'pool 2.ubuntu.pool.ntp.org iburst\n'
servers += 'pool 3.ubuntu.pool.ntp.org iburst\n'
servers += 'pool ntp.ubuntu.com\n'
else:
servers += 'pool 0.debian.pool.ntp.org iburst\n'
servers += 'pool 1.debian.pool.ntp.org iburst\n'
servers += 'pool 2.debian.pool.ntp.org iburst\n'
servers += 'pool 3.debian.pool.ntp.org iburst\n'
cmds = [ cmds = [
# NTP # NTP
'timedatectl set-ntp false', 'timedatectl set-ntp false',
......
...@@ -13,7 +13,7 @@ SKYREACH_SSL_VERIFY='1' ...@@ -13,7 +13,7 @@ SKYREACH_SSL_VERIFY='1'
SKYREACH_API_KEY= SKYREACH_API_KEY=
SKYREACH_ACTIVATION_KEY= SKYREACH_ACTIVATION_KEY=
# NTP # NTP
NTP_SERVER='ntp.ubuntu.com' NTP_SERVER=''
# SSH # SSH
SSH_ALLOWED_KEYS= SSH_ALLOWED_KEYS=
SSH_MAINTENANCE_PORT= SSH_MAINTENANCE_PORT=
......
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