summaryrefslogtreecommitdiffstats
path: root/lavalab-gen.py
diff options
context:
space:
mode:
authorCorentin LABBE <clabbe@baylibre.com>2018-07-26 16:48:53 +0200
committerCorentin LABBE <clabbe@baylibre.com>2018-07-26 16:49:24 +0200
commitb19b71ab89761e801c27038f093d76655efabfbf (patch)
tree6502b5650c12f630bb6aada9448ca4238b556148 /lavalab-gen.py
parentb7b57615f30030fc1a456da1008a0231836fa5ac (diff)
Permit to configure email for LAVA users
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-xlavalab-gen.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py
index 4c77c2b..2d21fe7 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -160,7 +160,7 @@ def main():
need_zmq_auth_gen = True
if "users" in worker:
for user in worker["users"]:
- keywords_users = [ "name", "staff", "superuser", "password", "token" ]
+ keywords_users = [ "name", "staff", "superuser", "password", "token", "email" ]
for keyword in user:
if not keyword in keywords_users:
print("WARNING: unknown keyword %s" % keyword)
@@ -173,6 +173,9 @@ def main():
password = user["password"]
ftok.write("PASSWORD=" + password + "\n")
# libyaml convert yes/no to true/false...
+ if "email" in user:
+ email = user["email"]
+ ftok.write("EMAIL=" + email + "\n")
if "staff" in user:
value = user["staff"]
if value is True: