homelab/roles/keycloak/tasks/main.yml

26 lines
763 B
YAML
Raw Permalink Normal View History

2021-05-18 21:10:37 +00:00
- name: run container
docker_container:
name: "keycloak"
image: "quay.io/keycloak/keycloak"
ports:
- "8080:8080"
networks:
- name: external
2021-05-18 21:10:37 +00:00
- name: postgres
- name: openldap
2021-05-18 21:10:37 +00:00
env:
"KEYCLOAK_USER": "{{ vault_keycloak_user }}"
"KEYCLOAK_PASSWORD": "{{ vault_keycloak_password }}"
"DB_VENDOR": POSTGRES
"DB_ADDR": postgres
"DB_DATABASE": keycloak
"DB_USER": keycloak
"DB_SCHEMA": public
"DB_PASSWORD": "{{ vault_postgres_keycloak_user_password }}"
"PROXY_ADDRESS_FORWARDING": "true"
- name: copy nginx conf
template:
src: "keycloak.conf.j2"
2021-06-21 09:11:27 +00:00
dest: "{{ data_folder }}/nginx/conf.d/{{ role_name }}.{{ base_domain }}.conf"
2021-05-18 21:10:37 +00:00
mode: "755"
notify: reload nginx