Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate Let's Encrypt SSL Certificate Renewal #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

0xBienCuit
Copy link
Collaborator

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

  • Nginx Configuration:

    • Updated to allow the ACME challenge to pass through.
  • Certificate Renewal Script:

    • Created a script to automate the renewal process and reload Nginx.
  • Ansible Playbook:

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

Notes

  • Still in the process of trying to get my cloud provider accounts setup, hence I wasn't able to test it using this repository.
  • Ideally if necessary am willing to make a smaller version on my own repo with only access to AWS to verify it.

- Added `renew_certificates.yml` playbook and `renew_certificates.sh` script for Let's Encrypt renewal.
- Updated nginx config for ACME challenge and imported playbook into site playbook.
@devzspy
Copy link
Contributor

devzspy commented Sep 4, 2024

Resolves #82 if merged

@devzspy devzspy linked an issue Sep 4, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

let's encrypt renewal not automated
2 participants