From f6dcce239baba52c6a2ecebcc658a45c9d640d43 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Mon, 7 Jun 2021 13:04:12 +0200 Subject: [PATCH] certbot move hooks --- certbot/files/hooks/{ => deploy}/apache.sh | 0 certbot/files/hooks/{ => deploy}/dovecot.sh | 0 certbot/files/hooks/{ => deploy}/haproxy.sh | 0 certbot/files/hooks/{ => deploy}/nginx.sh | 0 certbot/files/hooks/{ => deploy}/postfix.sh | 0 certbot/files/hooks/{ => deploy}/sync_remote.sh | 0 certbot/files/hooks/{ => deploy}/z-commit-etc.sh | 0 certbot/tasks/main.yml | 6 ++++-- 8 files changed, 4 insertions(+), 2 deletions(-) rename certbot/files/hooks/{ => deploy}/apache.sh (100%) rename certbot/files/hooks/{ => deploy}/dovecot.sh (100%) rename certbot/files/hooks/{ => deploy}/haproxy.sh (100%) rename certbot/files/hooks/{ => deploy}/nginx.sh (100%) rename certbot/files/hooks/{ => deploy}/postfix.sh (100%) rename certbot/files/hooks/{ => deploy}/sync_remote.sh (100%) rename certbot/files/hooks/{ => deploy}/z-commit-etc.sh (100%) diff --git a/certbot/files/hooks/apache.sh b/certbot/files/hooks/deploy/apache.sh similarity index 100% rename from certbot/files/hooks/apache.sh rename to certbot/files/hooks/deploy/apache.sh diff --git a/certbot/files/hooks/dovecot.sh b/certbot/files/hooks/deploy/dovecot.sh similarity index 100% rename from certbot/files/hooks/dovecot.sh rename to certbot/files/hooks/deploy/dovecot.sh diff --git a/certbot/files/hooks/haproxy.sh b/certbot/files/hooks/deploy/haproxy.sh similarity index 100% rename from certbot/files/hooks/haproxy.sh rename to certbot/files/hooks/deploy/haproxy.sh diff --git a/certbot/files/hooks/nginx.sh b/certbot/files/hooks/deploy/nginx.sh similarity index 100% rename from certbot/files/hooks/nginx.sh rename to certbot/files/hooks/deploy/nginx.sh diff --git a/certbot/files/hooks/postfix.sh b/certbot/files/hooks/deploy/postfix.sh similarity index 100% rename from certbot/files/hooks/postfix.sh rename to certbot/files/hooks/deploy/postfix.sh diff --git a/certbot/files/hooks/sync_remote.sh b/certbot/files/hooks/deploy/sync_remote.sh similarity index 100% rename from certbot/files/hooks/sync_remote.sh rename to certbot/files/hooks/deploy/sync_remote.sh diff --git a/certbot/files/hooks/z-commit-etc.sh b/certbot/files/hooks/deploy/z-commit-etc.sh similarity index 100% rename from certbot/files/hooks/z-commit-etc.sh rename to certbot/files/hooks/deploy/z-commit-etc.sh diff --git a/certbot/tasks/main.yml b/certbot/tasks/main.yml index 1ab9c1c6..e280875c 100644 --- a/certbot/tasks/main.yml +++ b/certbot/tasks/main.yml @@ -23,7 +23,7 @@ - name: Deploy hooks are present copy: - src: hooks/ + src: hooks/deploy/ dest: /etc/letsencrypt/renewal-hooks/deploy/ mode: "0700" owner: root @@ -36,11 +36,13 @@ line: "servers=\"{{ certbot_hooks_sync_remote_servers | join(' ') }}\"" create: yes -- name: Move commit-etc.sh to z-commit-etc.sh if present +# begining of backward compatibility tasks +- name: Move deploy/commit-etc.sh to deploy/z-commit-etc.sh if present command: "mv /etc/letsencrypt/renewal-hooks/deploy/commit-etc.sh /etc/letsencrypt/renewal-hooks/deploy/z-commit-etc.sh" args: removes: /etc/letsencrypt/renewal-hooks/deploy/commit-etc.sh creates: /etc/letsencrypt/renewal-hooks/deploy/z-commit-etc.sh +# end of backward compatibility tasks - name: "certbot lock is ignored by Git" lineinfile: