From 65057ed263e49e7ff148fcd8d03f27b791945531 Mon Sep 17 00:00:00 2001 From: Stephane de Labrusse Date: Fri, 26 Apr 2024 14:20:59 +0200 Subject: [PATCH] Update configure-module action to use boolean values for lets_encrypt and http2https environment variables --- imageroot/actions/clone-module/50configure-module | 4 ++-- imageroot/actions/restore-module/50configure-module | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/imageroot/actions/clone-module/50configure-module b/imageroot/actions/clone-module/50configure-module index f20c7ed..5845748 100755 --- a/imageroot/actions/clone-module/50configure-module +++ b/imageroot/actions/clone-module/50configure-module @@ -10,8 +10,8 @@ import os configure_retval = agent.tasks.run(agent_id=os.environ['AGENT_ID'], action='configure-module', data={ "mail_server": os.environ["MAIL_SERVER"], - "lets_encrypt": os.environ["TRAEFIK_LETS_ENCRYPT"], + "lets_encrypt": os.environ["TRAEFIK_LETS_ENCRYPT"] == 'True', "host": os.environ["TRAEFIK_HOST"], - "http2https": os.environ["TRAEFIK_HTTP2HTTPS"], + "http2https": os.environ["TRAEFIK_HTTP2HTTPS"] == 'True', }) agent.assert_exp(configure_retval['exit_code'] == 0, "The configure-module subtask failed!") diff --git a/imageroot/actions/restore-module/50configure-module b/imageroot/actions/restore-module/50configure-module index 4b9d220..e6e77ac 100755 --- a/imageroot/actions/restore-module/50configure-module +++ b/imageroot/actions/restore-module/50configure-module @@ -15,8 +15,8 @@ renv = request['environment'] configure_retval = agent.tasks.run(agent_id=os.environ['AGENT_ID'], action='configure-module', data={ "mail_server": renv["MAIL_SERVER"], - "lets_encrypt": renv["TRAEFIK_LETS_ENCRYPT"], + "lets_encrypt": renv["TRAEFIK_LETS_ENCRYPT"] == 'True', "host": renv["TRAEFIK_HOST"], - "http2https": renv["TRAEFIK_HTTP2HTTPS"], + "http2https": renv["TRAEFIK_HTTP2HTTPS"] == 'True', }) agent.assert_exp(configure_retval['exit_code'] == 0, "The configure-module subtask failed!")