Skip install when there is not configuration, and install the package to be setup properly.
This commit is contained in:
parent
b833ad6110
commit
b5b50146dd
@ -59,6 +59,10 @@ def handle(_name, cfg, cloud, log, _args):
|
|||||||
raise RuntimeError(("'landscape' key existed in config,"
|
raise RuntimeError(("'landscape' key existed in config,"
|
||||||
" but not a dictionary type,"
|
" but not a dictionary type,"
|
||||||
" is a %s instead"), util.obj_name(ls_cloudcfg))
|
" is a %s instead"), util.obj_name(ls_cloudcfg))
|
||||||
|
if not ls_cloudcfg:
|
||||||
|
return
|
||||||
|
|
||||||
|
cloud.distro.install_packages(["landscape-client"])
|
||||||
|
|
||||||
merge_data = [
|
merge_data = [
|
||||||
LSC_BUILTIN_CFG,
|
LSC_BUILTIN_CFG,
|
||||||
@ -79,8 +83,7 @@ def handle(_name, cfg, cloud, log, _args):
|
|||||||
util.write_file(lsc_client_fn, contents.getvalue())
|
util.write_file(lsc_client_fn, contents.getvalue())
|
||||||
log.debug("Wrote landscape config file to %s", lsc_client_fn)
|
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):
|
def merge_together(objs):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user