https://github.com/noahbailey/ansible-nginx-certbot
Setup a simple reverse proxy with Certbot TLS
https://github.com/noahbailey/ansible-nginx-certbot
acme ansible-role certbot cloudflare letsencrypt nginx proxy
Last synced: about 2 months ago
JSON representation
Setup a simple reverse proxy with Certbot TLS
- Host: GitHub
- URL: https://github.com/noahbailey/ansible-nginx-certbot
- Owner: noahbailey
- License: gpl-3.0
- Created: 2019-07-19T01:41:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-21T01:16:34.000Z (over 5 years ago)
- Last Synced: 2025-02-25T14:33:39.695Z (over 1 year ago)
- Topics: acme, ansible-role, certbot, cloudflare, letsencrypt, nginx, proxy
- Language: HTML
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-nginx-certbot
Setup a simple reverse proxy with Certbot TLS
Components:
* Nginx web server and front end proxy
* Certbot TLS certificate authority
* CloudFlare DNS service
This role takes data from ansible variables and uses it to configure a basic Nginx reverse proxy server.
## Usage
Add this role to the `roles` directory in your ansible project.
Then, include the role using a top level playbook:
```yaml
- name: Proxy servers
hosts: proxy-servers
become: true
roles:
- ansible-nginx-certbot
```
## Variables
This role requires these variables to exist in inventory:
#### 1. Sites
This is a list of sites or web applications that will run behind the proxy server. It is formatted as a list of mappings.
Multiple backend servers can be defined. By default, it will configure src address load balancing when there is more than one backend server defined.
```yaml
sites:
- name: app1.gablogianartcollection.org
backends:
- host: 10.10.10.11
- host: 10.10.10.12
```
#### 2. Cloudflare Account
To create DNS records a CloudFlare global API key is required.
```yaml
cloudflare:
api_key: aaaaaazzzzzz
email: ongo@gablogianartcollection.org
domain: gablogianartcollection.org
```
Since the API key essentially grants full access to the account it should be stored securely in Ansible Vault before it is added to a git repository.