diff options
author | Thomas Hervé <thomas@canonical.com> | 2012-10-15 10:25:09 +0200 |
---|---|---|
committer | Thomas Hervé <thomas@canonical.com> | 2012-10-15 10:25:09 +0200 |
commit | 7d7cb0c7126ad4f67099f741dac67aceff66d002 (patch) | |
tree | 1bfd60f8abbbd819636dd3ddc28ecfb313648e85 /cloudinit/config/cc_landscape.py | |
parent | 4a3eab9f5a49f8ebdf30b8378fa58c342b3d9c8a (diff) | |
download | vyos-cloud-init-7d7cb0c7126ad4f67099f741dac67aceff66d002.tar.gz vyos-cloud-init-7d7cb0c7126ad4f67099f741dac67aceff66d002.zip |
Skip install when there is not configuration, and install the package to be setup properly.
Diffstat (limited to 'cloudinit/config/cc_landscape.py')
-rw-r--r-- | cloudinit/config/cc_landscape.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cloudinit/config/cc_landscape.py b/cloudinit/config/cc_landscape.py index 7cfb8296..331559f4 100644 --- a/cloudinit/config/cc_landscape.py +++ b/cloudinit/config/cc_landscape.py @@ -59,6 +59,10 @@ def handle(_name, cfg, cloud, log, _args): raise RuntimeError(("'landscape' key existed in config," " but not a dictionary type," " is a %s instead"), util.obj_name(ls_cloudcfg)) + if not ls_cloudcfg: + return + + cloud.distro.install_packages(["landscape-client"]) merge_data = [ LSC_BUILTIN_CFG, @@ -79,8 +83,7 @@ def handle(_name, cfg, cloud, log, _args): util.write_file(lsc_client_fn, contents.getvalue()) log.debug("Wrote landscape config file to %s", lsc_client_fn) - if ls_cloudcfg: - util.write_file(LS_DEFAULT_FILE, "RUN=1\n") + util.write_file(LS_DEFAULT_FILE, "RUN=1\n") def merge_together(objs): |