{"id":16820950,"url":"https://github.com/erdii/ansible-cdn-letsencrypt","last_synced_at":"2026-05-17T12:05:27.941Z","repository":{"id":94175240,"uuid":"90397625","full_name":"erdii/ansible-cdn-letsencrypt","owner":"erdii","description":"A hacky ansible playbook to set up a controller server with an ansible playbook to set up cdn-reverse proxies with one shared letsencrypt certificate - wtf 😱🔫","archived":false,"fork":false,"pushed_at":"2018-08-27T13:33:55.000Z","size":12,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T16:18:07.934Z","etag":null,"topics":["ansible","cdn","certificate","letsencrypt","reverse-proxies"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erdii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-05T16:50:06.000Z","updated_at":"2025-02-24T02:46:41.000Z","dependencies_parsed_at":"2023-03-10T23:45:33.215Z","dependency_job_id":null,"html_url":"https://github.com/erdii/ansible-cdn-letsencrypt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erdii/ansible-cdn-letsencrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erdii%2Fansible-cdn-letsencrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erdii%2Fansible-cdn-letsencrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erdii%2Fansible-cdn-letsencrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erdii%2Fansible-cdn-letsencrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erdii","download_url":"https://codeload.github.com/erdii/ansible-cdn-letsencrypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erdii%2Fansible-cdn-letsencrypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33137831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","cdn","certificate","letsencrypt","reverse-proxies"],"created_at":"2024-10-13T10:58:36.586Z","updated_at":"2026-05-17T12:05:27.912Z","avatar_url":"https://github.com/erdii.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible-cdn-letsencrypt\n\nAn Ansible playbook to set up a bunch of reverse proxies with a shared letsencrypt certificate\n\n-\u003e EXPERIMENTAL\n\nThis is mostly obsolete because the new ACMEv2 API supports DNS challenges, that make it a lot easier to get and distribute ssl certificates from let's encrypt\n\n## Prerequisites\n\n* ansible on your local host\n* one blank controller server\n* some blank proxy servers\n* a domain pointing to your controller server eg. `ctrl.example.com`\n* a domain pointing to your distribution consisting of all your reverse proxies eg. `www.example.com`\n\n* an `inventory` file with content like this:\n    ```\n    [controller]\n    x.x.x.x\n\n    [proxies]\n    y.y.y.y proxy_number=1\n    z.z.z.z proxy_number=2\n    ```\n\n\n## Setting up the controller and deploying the 'stage-2' playbook\n\n* run `ansible-playbook -i inventory playbook.yml`\n\n\n## Initializing the proxy-servers and aquiring a certificate from letsencrypt\n\n* ssh into the controller\n* run `./init_proxies.sh`\n* you should be fine to go now\n\n\n## Renewing the certificate\n\n* ssh into the controller\n* run `./update_proxies.sh`\n\n\n## Caveats\n\n* *ssh hostkeys*: for now we dont automatically trust **new** ssh host keys after the initial setup. **workaround**:\n    * ssh into all new proxy servers from your machine before starting\n    * ssh into all new proxy server from the controller before running `./init_proxies.sh`\n    **or**\n    * run `./trust_hosts.sh y.y.y.y z.z.z.z` from your machine before starting\n    * run `./trust_hosts.sh y.y.y.y z.z.z.z` from the controller before running `./init_proxies.sh`\n\n* *adding new proxies*: this is currently **untested**:\n    * theoretically updating the `inventory` file, re-deploying the 'stage-2' playbook and executing `./update_proxies` on the controller should work\n\n\n## Todo\n\n* handle multiple domains (nginx config and letsencrypt)\n* automated tests?\n* test adding another proxy after the initial setup\n* automate certificate renewal with a cronjob\n\n## Disclaimer\n\n```\nI am not responsible for damages to your soft- or hardware or bugs eating your cat that occur through usage of this code or part of it.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferdii%2Fansible-cdn-letsencrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferdii%2Fansible-cdn-letsencrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferdii%2Fansible-cdn-letsencrypt/lists"}