From 0c1f8c19c49f317b6afeaba2168e1949a4b7b66c Mon Sep 17 00:00:00 2001 From: Sean Buckley Date: Mon, 10 Apr 2023 14:31:49 -0400 Subject: [PATCH] deploy: do not require special character for groups --- pkgs/deploy/deploy.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/deploy/deploy.py b/pkgs/deploy/deploy.py index da40e5c..6d3de45 100755 --- a/pkgs/deploy/deploy.py +++ b/pkgs/deploy/deploy.py @@ -35,8 +35,8 @@ def expand(ln): for item in ln.split(","): if item == "all": hosts.update(depl) - elif item[0] == "@": - hosts.update(x for x in depl if item[1:] in depl[x]["tags"]) + elif item in tags: + hosts.update(name for name in depl if item in depl[name]["tags"]) else: hosts.add(item) for host in hosts: @@ -185,5 +185,6 @@ icon_bad = "\u274c" icon_good = "\u2705" strict_host_key_checking() depl = get_deployment() +tags = set(sum([depl[name]["tags"] for name in depl], [])) if __name__ == "__main__": main()