1
Author: Scott Moser <smoser@ubuntu.com>
3
Bug: https://launchpad.net/bugs/1066115
4
Applied-Upstream: revno 687
5
Description: do nothing if config not given. install landscape-client.
6
Skip all the work when there is no config section.
7
Then enforce the package installation, which will create the config file with
8
the proper permissions.
9
--- a/cloudinit/CloudConfig/cc_landscape.py
10
+++ b/cloudinit/CloudConfig/cc_landscape.py
11
@@ -51,6 +51,11 @@ def handle(_name, cfg, _cloud, log, _arg
12
if not isinstance(ls_cloudcfg, dict):
13
raise(Exception("'landscape' existed in config, but not a dict"))
18
+ util.install_packages(["landscape-client"])
20
merged = mergeTogether([lsc_builtincfg, lsc_client_cfg_file, ls_cloudcfg])
22
if not os.path.isdir(os.path.dirname(lsc_client_cfg_file)):
23
@@ -59,9 +64,8 @@ def handle(_name, cfg, _cloud, log, _arg
24
with open(lsc_client_cfg_file, "w") as fp:
28
- with open(lsc_client_default_file, "w") as fp:
30
+ with open(lsc_client_default_file, "w") as fp:
33
log.debug("updated %s" % lsc_client_cfg_file)