Commit 73ebf2a7 authored by Dimitris Aragiorgis's avatar Dimitris Aragiorgis

deploy: Add user only if not exists

This way, if Kamaki setup fails for some reason (after adding the
user) we can run snf-deploy again without having astakos complaining
about duplicate user email.
Signed-off-by: default avatarDimitris Aragiorgis <dimara@grnet.gr>
parent d58f3d7b
......@@ -1189,12 +1189,14 @@ class Astakos(base.Component):
@base.run_cmds
def add_user(self):
info = (
config.user_email,
config.user_passwd,
config.user_email,
config.user_name,
config.user_lastname,
)
cmd = "snf-manage user-add --password %s %s %s %s" % info
cmd = "snf-manage user-show %s || \
snf-manage user-add --password %s %s %s %s" % info
return [cmd]
@update_admin
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment