From 52f4053718c333c7d1b06b807c1430b8a309e906 Mon Sep 17 00:00:00 2001 From: chrisfu Date: Wed, 6 May 2026 15:57:57 -0400 Subject: [PATCH] fix(acme): replace fragile key-file regex selector with rejectattr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit selectattr with 'match' regex was returning empty sequence on this Ansible version. Since each install entry has exactly two items (fullchain.cer + key), rejectattr the fullchain to get the key — no regex needed. Co-Authored-By: Claude Sonnet 4.6 --- infrastructure/roles/acme/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/roles/acme/tasks/main.yml b/infrastructure/roles/acme/tasks/main.yml index 6593553..cd255ec 100644 --- a/infrastructure/roles/acme/tasks/main.yml +++ b/infrastructure/roles/acme/tasks/main.yml @@ -94,7 +94,7 @@ -d {{ item.domain }} --home {{ acme_install_dir }} --fullchain-file {{ (item.install | selectattr('src', 'equalto', 'fullchain.cer') | first).dest }} - --key-file {{ (item.install | selectattr('src', 'match', '.*\\.key$') | first).dest }} + --key-file {{ (item.install | rejectattr('src', 'equalto', 'fullchain.cer') | first).dest }} loop: "{{ acme_certs }}" notify: reload prole ssl consumers