Skip to content

Commit

Permalink
Refactor configure-module action to use boolean values for lets_encry…
Browse files Browse the repository at this point in the history
…pt, auxiliary_account, activesync, and dav
  • Loading branch information
stephdl committed Jun 10, 2024
1 parent b32102f commit cd097a5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions imageroot/actions/restore-module/50call-configure-module
Original file line number Diff line number Diff line change
Expand Up @@ -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!")

0 comments on commit cd097a5

Please sign in to comment.