redteaminfra / redteam-infra

100 stars 25 forks source link

Automate Let's Encrypt SSL Certificate Renewal #119

Open 0xBienCuit opened 2 months ago

0xBienCuit commented 2 months ago

Summary

This pull request automates the renewal of Let's Encrypt SSL certificates, addressing the manual and error-prone process. Key changes include:

  1. Nginx Configuration Update:

    • Added a location block to allow the ACME challenge to pass through.
  2. Certificate Renewal Script:

    • Created renew_certificates.sh to handle the renewal process using certbot.
    • Placed the script in ansible/roles/openresty/files/.
  3. Ansible Playbook Update:

    • Added renew_certificates.yml to deploy the script and set up a cron job.
    • Updated site.yml to include the new playbook.

Changes

Notes

devzspy commented 2 months ago

Resolves #82 if merged