Skip to content

Commit

Permalink
chore: use lineinfile instead of sed
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare committed Dec 18, 2024
1 parent f17d52c commit 34370b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion roles/certbot/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
mode: "755"

- name: Add deploy hook to {{ certbot_certbot_sysconfig_path }}
ansible.builtin.command: sed -i 's/^DEPLOY_HOOK=""/DEPLOY_HOOK="--deploy-hook \\\"\/usr\/local\/libexec\/cert_sync.sh\\\""/' {{ certbot_certbot_sysconfig_path }}
ansible.builtin.lineinfile:
path: "{{ certbot_certbot_sysconfig_path }}"
regexp: "^DEPLOY_HOOK="
line: DEPLOY_HOOK="--deploy-hook /usr/local/libexec/cert_sync.sh"

- name: Add certificates to certbot
ansible.builtin.command: "{{ certbot_certbot_binary_path }} certonly \
Expand Down

0 comments on commit 34370b0

Please sign in to comment.