Skip to content

Commit

Permalink
fix(state): handle strings
Browse files Browse the repository at this point in the history
  • Loading branch information
genaumann committed Jan 20, 2024
1 parent 64dc334 commit 5dc27ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions _states/acme_sh.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@ def cert(

# error checking

if aliases and not isinstance(aliases, list):
# aliases can be a string ?
if aliases and aliases != "None" and not isinstance(aliases, list):
raise salt.exceptions.SaltInvocationError("aliases must be a list")

if dns_credentials and not isinstance(dns_credentials, dict):
Expand Down Expand Up @@ -254,10 +255,10 @@ def cert(
acme_mode,
aliases=",".join(aliases) if aliases else None,
server=server,
keysize=keysize,
keysize=str(keysize),
dns_plugin=dns_plugin,
webroot=webroot,
http_port=http_port,
http_port=str(http_port),
user=user,
cert_path=cert_path,
dns_credentials=dns_credentials,
Expand Down

0 comments on commit 5dc27ee

Please sign in to comment.