homeserver/roles/hispanico.letsencrypt-nginx-revproxy
2020-08-18 11:57:53 +02:00
..
defaults first commit 2020-08-18 11:57:53 +02:00
handlers first commit 2020-08-18 11:57:53 +02:00
meta first commit 2020-08-18 11:57:53 +02:00
tasks first commit 2020-08-18 11:57:53 +02:00
templates first commit 2020-08-18 11:57:53 +02:00
tests first commit 2020-08-18 11:57:53 +02:00
vars first commit 2020-08-18 11:57:53 +02:00
.travis.yml first commit 2020-08-18 11:57:53 +02:00
README.md first commit 2020-08-18 11:57:53 +02:00

ansible-letsencrypt-nginx-revproxy

Build Status Galaxy

Configures Nginx as reverse proxy for multiple website with Let's Encrypt certificate.

Requirements

This role requires Ansible 1.9 or higher.

Role Variables

Default values:

nginx_revproxy_sites:                                         # List of sites to reverse proxy
  example.com:                                                # Domain name
    domains:                                                  # List of server_name aliases
      - example.com
      - www.example.com
    upstreams:                                                # List of Upstreams
      - { backend_address: 192.168.0.100, backend_port: 80 }
      - { backend_address: 192.168.0.101, backend_port: 8080 }
    letsencrypt: true                                        # Set to True if you are using hispanico.letsencrypt-nginx-revproxy role
    letsencrypt_email: 'contatti@ninux.org'

Dependencies

Example Playbook

This esample configure nginx as reverse proxy for the following sites:

  • example.org with selfsign ssl certificate
  • example.com ssl certificate generate via let's encrypt ACME protocol.
  - hosts: all
    roles:
      - ansible-nginx-revproxy
      - ansible-letsencrypt-nginx-revproxy
    vars:
      nginx_revproxy_sites:
        example.org:
          domains:
            - example.org
            - www.example.org
          upstreams:
            - { backend_address: 192.168.0.200, backend_port: 80 }
            - { backend_address: 192.168.0.201, backend_port: 80 }
          letsencrypt: false

        example.com:
          domains:
            - example.com
            - www.example.com
          upstreams:
            - { backend_address: 192.168.0.100, backend_port: 80 }
            - { backend_address: 192.168.0.101, backend_port: 80 }
          letsencrypt: true

License

Licensed under the GPLv3 License. See the LICENSE file for details.

Author Information

Hispanico