This role adds and enables a reverse proxy configuration to an existing nginx instance.
-
nginx -
An SSL cert for the domain.
-
In your local machine:
pip install -r requirements.txt
domain: domain (or subdomain) for the reverse proxy to bind to.binded_port: Internal binded port of the service we want the proxy to reach .external_port: External binded port through which the proxy will be accessible (with SSL/TLS).ssl_certificate: Path to the SSL cert file.ssl_certificate_key: Path to the SSL private key file.template_path: Path to the template for the nginx vhost configuration.
None.
- name: Add nginx proxy configuration
hosts: all
vars:
binded_port: 8000
domain: anarres.local
roles:
- role: add_nginx_proxy_confNote: by default this role will use the SSL cert files found in /etc/letsencrypt/live/{{ domain }}/.
To test the role you need molecule,
docker and some python requirements that can be installed wwith
pip install -r requirements-dev.txt.
molecule testor
make testGPLv3
- m0wer: m0wer (at) autistici (dot) org