From cd097a570ee4ca9ecccbeb20b6bd28d715e3c8f6 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Mon, 10 Jun 2024 09:32:11 +0200 Subject: [PATCH] Refactor configure-module action to use boolean values for lets_encrypt, auxiliary_account, activesync, and dav --- imageroot/actions/restore-module/50call-configure-module | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/imageroot/actions/restore-module/50call-configure-module b/imageroot/actions/restore-module/50call-configure-module index 33749fb..c519b31 100755 --- a/imageroot/actions/restore-module/50call-configure-module +++ b/imageroot/actions/restore-module/50call-configure-module @@ -14,16 +14,15 @@ request = json.load(sys.stdin) renv = request['environment'] configure_retval = agent.tasks.run(agent_id=os.environ['AGENT_ID'], action='configure-module', data={ - "ldap_domain": renv["LDAP_DOMAIN"], "admin_users": renv["ADMIN_USERS"], "mail_server": renv["MAIL_SERVER"], "mail_domain": renv["MAIL_DOMAIN"], - "lets_encrypt": renv["TRAEFIK_LETS_ENCRYPT"], + "lets_encrypt": renv["TRAEFIK_LETS_ENCRYPT"] == 'True', "host": renv["TRAEFIK_HOST"], "workers_count": renv["WOWORKERSCOUNT"], - "auxiliary_account": renv["AUXILIARYACCOUNT"], - "activesync": renv["ACTIVESYNC"], - "dav": renv["DAV"], + "auxiliary_account": renv["AUXILIARYACCOUNT"] == 'True', + "activesync": renv["ACTIVESYNC"] == 'True', + "dav": renv["DAV"] == 'True', }) agent.assert_exp(configure_retval['exit_code'] == 0, "The configure-module subtask failed!")