2021-05-05 22:03:31 +00:00
|
|
|
- name: ensure directories exist
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
mode: '0755'
|
|
|
|
loop:
|
|
|
|
- "{{ data_folder }}/oauth2-proxy"
|
|
|
|
- name: copy oauth2-proxy config
|
|
|
|
template:
|
|
|
|
src: oauth2-proxy.cfg
|
|
|
|
dest: "{{ data_folder }}/oauth2-proxy/oauth2-proxy.cfg"
|
|
|
|
mode: '0755'
|
|
|
|
notify: reload nginx
|
|
|
|
- name: run container
|
|
|
|
docker_container:
|
|
|
|
name: 'oauth2-proxy'
|
|
|
|
image: quay.io/oauth2-proxy/oauth2-proxy
|
|
|
|
networks:
|
|
|
|
- name: bridge
|
|
|
|
- name: nginx-internal
|
2021-05-06 06:35:58 +00:00
|
|
|
command: '/bin/oauth2-proxy --config=/etc/oauth2-proxy.cfg'
|
2021-05-05 22:03:31 +00:00
|
|
|
volumes:
|
2021-05-06 06:35:58 +00:00
|
|
|
- "{{ data_folder }}/oauth2-proxy/oauth2-proxy.cfg:/etc/oauth2-proxy.cfg"
|
2021-05-05 22:03:31 +00:00
|
|
|
ports:
|
|
|
|
- "4180:4180"
|
|
|
|
- name: copy oauth2-proxy nginx config
|
|
|
|
template:
|
|
|
|
src: oauth2-proxy.conf.j2
|
|
|
|
dest: "{{ nginx_confd_folder }}/oauth2-proxy.conf"
|
|
|
|
mode: '0755'
|
|
|
|
notify: reload nginx
|