summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2015-03-04 15:51:46 -0500
committerScott Moser <smoser@ubuntu.com>2015-03-04 15:51:46 -0500
commite7cce1a06429813b8d2acc87e6609671d39a3254 (patch)
treeba5d37605645186169ff0da8ec588098c15721b8 /cloudinit
parent0ce85f53c15bce21e65a419fe71127c6d94064aa (diff)
downloadvyos-cloud-init-e7cce1a06429813b8d2acc87e6609671d39a3254.tar.gz
vyos-cloud-init-e7cce1a06429813b8d2acc87e6609671d39a3254.zip
apt_configure: allow disabling
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_apt_configure.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py
index de72903f..2c51d116 100644
--- a/cloudinit/config/cc_apt_configure.py
+++ b/cloudinit/config/cc_apt_configure.py
@@ -51,6 +51,10 @@ EXPORT_GPG_KEYID = """
def handle(name, cfg, cloud, log, _args):
+ if util.is_false(cfg.get('apt_configure_enabled', True)):
+ log.debug("Skipping module named %s, disabled by config.", name)
+ return
+
release = get_release()
mirrors = find_apt_mirror_info(cloud, cfg)
if not mirrors or "primary" not in mirrors: