diff options
author | Chad Smith <chad.smith@canonical.com> | 2017-11-21 11:43:26 -0700 |
---|---|---|
committer | Chad Smith <chad.smith@canonical.com> | 2017-11-21 11:43:26 -0700 |
commit | 5b974bbab161e6cd73751bf27b7741f6b0d19051 (patch) | |
tree | f634411a9b12b2e36ff8beefbec39dad21cd45ea /cloudinit/config/cc_ntp.py | |
parent | c9c7ff70f55ee024dd54336f07ba52acec1f6929 (diff) | |
parent | 7624348712b4502f0085d30c05b34dce3f2ceeae (diff) | |
download | vyos-cloud-init-5b974bbab161e6cd73751bf27b7741f6b0d19051.tar.gz vyos-cloud-init-5b974bbab161e6cd73751bf27b7741f6b0d19051.zip |
merge from 7624348712b4502f0085d30c05b34dce3f2ceeae at 17.1-41-g76243487
Diffstat (limited to 'cloudinit/config/cc_ntp.py')
-rw-r--r-- | cloudinit/config/cc_ntp.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cloudinit/config/cc_ntp.py b/cloudinit/config/cc_ntp.py index d43d060c..f50bcb35 100644 --- a/cloudinit/config/cc_ntp.py +++ b/cloudinit/config/cc_ntp.py @@ -23,7 +23,7 @@ frequency = PER_INSTANCE NTP_CONF = '/etc/ntp.conf' TIMESYNCD_CONF = '/etc/systemd/timesyncd.conf.d/cloud-init.conf' NR_POOL_SERVERS = 4 -distros = ['centos', 'debian', 'fedora', 'opensuse', 'ubuntu'] +distros = ['centos', 'debian', 'fedora', 'opensuse', 'sles', 'ubuntu'] # The schema definition for each cloud-config module is a strict contract for @@ -174,8 +174,13 @@ def rename_ntp_conf(config=None): def generate_server_names(distro): names = [] + pool_distro = distro + # For legal reasons x.pool.sles.ntp.org does not exist, + # use the opensuse pool + if distro == 'sles': + pool_distro = 'opensuse' for x in range(0, NR_POOL_SERVERS): - name = "%d.%s.pool.ntp.org" % (x, distro) + name = "%d.%s.pool.ntp.org" % (x, pool_distro) names.append(name) return names |