Module: check_mk
Branch: master
Commit: 11e589b56ba2f9a5d6d7144f07663a42301c3854
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=11e589b56ba2f9…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Jan 28 23:32:25 2019 +0100
7077 FIX omd create: Only use --admin-password when it has an actual value
Change-Id: Icf075de434ef879b5420a9d21d66f868acbfde89
---
.werks/7077 | 10 ++++++++++
omd/packages/omd/omdlib/main.py | 4 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/7077 b/.werks/7077
new file mode 100644
index 0000000..efcadfc
--- /dev/null
+++ b/.werks/7077
@@ -0,0 +1,10 @@
+Title: omd create: Only use --admin-password when it has an actual value
+Level: 1
+Component: omd
+Compatible: compat
+Edition: cre
+Version: 1.6.0i1
+Date: 1548714687
+Class: fix
+
+
diff --git a/omd/packages/omd/omdlib/main.py b/omd/packages/omd/omdlib/main.py
index 62dde00..b96e6bb 100644
--- a/omd/packages/omd/omdlib/main.py
+++ b/omd/packages/omd/omdlib/main.py
@@ -710,7 +710,9 @@ def create_version_symlink(site, version):
def calculate_admin_password(options):
- return options.get("admin-password", random_password())
+ if options.get("admin-password"):
+ return options["admin-password"]
+ return random_password()
def set_admin_password(site, pw):