From 5ac07b91e7dffa9105d847e1b2b0f42947fcd5f2 Mon Sep 17 00:00:00 2001 From: Andrew Vant Date: Thu, 7 Dec 2017 18:32:09 -0500 Subject: [PATCH] Cosmetic improvement to hook state name --- letsencrypt/client/init.sls | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/letsencrypt/client/init.sls b/letsencrypt/client/init.sls index b70dab2..1236e36 100644 --- a/letsencrypt/client/init.sls +++ b/letsencrypt/client/init.sls @@ -111,10 +111,10 @@ certbot_cron: {%- for hook in hooks %} {#- FIXME: Should probably complain if something other than pre/post/deploy is given, but I'm not sure how. #} - -certbot_renewal_{{ hookset }}_hook_{{ loop.index }}: +{%- set basename = hook.split("/") | last %} +certbot_renewal_{{ hookset }}_hook_{{ basename }}: file.managed: - - name: /etc/letsencrypt/renewal-hooks/{{ hookset }}/{{ hook.split("/") | last }} + - name: /etc/letsencrypt/renewal-hooks/{{ hookset }}/{{ basename }} - source: {{ hook }} - template: jinja - mode: 700