From d90defb16dd98d33c7159fbb84bf6eca8aaac2b9 Mon Sep 17 00:00:00 2001
From: Massimiliano Adamo <maxadamo@gmail.com>
Date: Mon, 17 Feb 2025 21:38:55 +0100
Subject: [PATCH] simplify client assignment logic in coyote script

---
 wile_coyote/bin/coyote | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/wile_coyote/bin/coyote b/wile_coyote/bin/coyote
index 75774e9..78b403b 100755
--- a/wile_coyote/bin/coyote
+++ b/wile_coyote/bin/coyote
@@ -141,10 +141,7 @@ if __name__ == "__main__":
     # client array elements are the folders where we upload the certificates
     # client is used only with Puppet
     # if we use tld we use 'common' as client
-    if ARGS["--client"]:
-        CLIENTS = ARGS["--client"]
-    if ARGS["--tld"]:
-        CLIENTS = ["common"]
+    CLIENTS = ARGS["--client"] if ARGS["--client"] else ["common"]
 
     # ensure that we need to run certbot
     cert_path = os.path.join("/etc", PROVIDER, "live", FIRST_NAME, "fullchain.pem")
-- 
GitLab