ansible-role-sso/tasks/start-oidc-test.yml

36 lines
1.3 KiB
YAML
Raw Normal View History

2022-07-19 14:26:08 +02:00
---
- name: Create oidc-test OpenID Connect client configuration
template:
src: hydra-client.json.j2
dest: "/etc/hydra/clients.d/{{ item.client_id }}.json"
with_items:
- client_id: "{{ oidc_test_app_client_id }}"
client_secret: "{{ oidc_test_app_client_secret }}"
client_name: "OIDC Test"
2022-07-21 14:19:23 +02:00
redirect_uris: ["{{ oidc_test_app_public_base_url }}/oauth2/callback"]
post_logout_redirect_uris: ["{{ oidc_test_app_public_base_url }}"]
logo_uri: https://www.cadoles.com/images/logo.svg
notify:
- Reload hydra clients
become: true
2022-07-19 14:26:08 +02:00
- name: Start oidc-test app
containers.podman.podman_container:
name: oidc-test
image: docker.io/bornholm/oidc-test:v0.0.0-4-gd786d3a
2022-07-19 14:26:08 +02:00
state: started
network: host
restart_policy: on-failure
2022-07-19 14:26:08 +02:00
recreate: yes
env:
OIDC_CLIENT_ID: "{{ oidc_test_app_client_id }}"
OIDC_CLIENT_SECRET: "{{ oidc_test_app_client_secret }}"
LOG_LEVEL: 0
2022-07-21 14:19:23 +02:00
OIDC_ISSUER_URL: "{{ hydra_urls_self_issuer_url }}/"
OIDC_INSECURE_SKIP_VERIFY: true
OIDC_REDIRECT_URL: "{{ oidc_test_app_public_base_url }}"
OIDC_POST_LOGOUT_REDIRECT_URL: "{{ oidc_test_app_public_base_url }}"
HTTP_ADDRESS: 127.0.0.1:8080
HTTP_PUBLIC_BASE_URL: "{{ oidc_test_app_public_base_url }}"
become: true