/ansible-role-oauth2-proxy

This role will assume the setup of https://github.com/bitly/oauth2_proxy.

Primary LanguageShell

Ansible Role: elao.oauth2-proxy

This role will assume the setup of oauth2-proxy.

It's part of the ELAO Ansible stack but can be used as a stand alone component.

Requirements

  • Ansible 1.9.0+

Dependencies

None.

Installation

Using ansible galaxy:

ansible-galaxy install elao.oauth2-proxy

You can add this role as a dependency for other roles by adding the role to the meta/main.yml file of your own role:

dependencies:
  - { role: elao.oauth2-proxy }

Role Handlers

Name Type Description
oauth2-proxy restart Service Restart oauth2 proxy

Role Variables

Name Default Type Description
elao_oauth2_proxy_package_version 2.0.1-elao3 String Package version
elao_oauth2_proxy_config_file /etc/oauth2-proxy/config.cfg String Config file
elao_oauth2_proxy_config_template config/base.cfg.j2 String Config template
elao_oauth2_proxy_config [] Array Config

Configuration example

elao_oauth2_proxy_config:
  - http_address: 0.0.0.0:80
  - request_logging: true
  - upstreams:
    - http://127.0.0.1:8080/
  - email_domains:
    - manalas.com
  - client_id: oauth2_client_id
  - client_secret: oauth2_client_secret
  - cookie_name: _oauth2_proxy
  - cookie_secret: cookie_secret
  - cookie_domain: .manalas.com
  - cookie_expire: 168h
  - cookie_refresh: 1h
  - cookie_secure: true
  - cookie_httponly: true
  - skip_auth_regex:
    - /foo

Example playbook

- hosts: servers
  roles:
     - { role: elao.oauth2-proxy }

Licence

MIT

Author information

ELAO (http://www.elao.com/)