From 211f01e121d7c3b434d9a69661c967d5c0a43fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bompard?= Date: Tue, 20 Feb 2018 14:28:44 +0000 Subject: [PATCH] Hubs: use more variables --- roles/hubs/tasks/main.yml | 4 ++-- roles/hubs/templates/oidc_client_secrets.json | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/hubs/tasks/main.yml b/roles/hubs/tasks/main.yml index d0ac435ccf..4f4951037f 100644 --- a/roles/hubs/tasks/main.yml +++ b/roles/hubs/tasks/main.yml @@ -47,7 +47,7 @@ args: creates: "{{ hubs_conf_dir }}/client_secrets.json" notify: "hubs configuration change" - when: inventory_hostname == 'hubs-dev.fedorainfracloud.org' + when: hubs_oidc_url == "iddev.fedorainfracloud.org" - name: Configure application to authenticate with the OIDC provider @@ -58,7 +58,7 @@ group: "{{ main_user }}" mode: 0640 notify: "hubs configuration change" - when: inventory_hostname != 'hubs-dev.fedorainfracloud.org' + when: hubs_oidc_url != "iddev.fedorainfracloud.org" - name: Fix the permissions on the OIDC secrets file diff --git a/roles/hubs/templates/oidc_client_secrets.json b/roles/hubs/templates/oidc_client_secrets.json index 7ea0e9b021..bf40300310 100644 --- a/roles/hubs/templates/oidc_client_secrets.json +++ b/roles/hubs/templates/oidc_client_secrets.json @@ -1,13 +1,13 @@ { "web": { "client_id": "hubs", - "auth_uri": "https://id.stg.fedoraproject.org/openidc/Authorization", - "issuer": "https://id.stg.fedoraproject.org/openidc/", + "auth_uri": "https://{{ hubs_oidc_url }}/openidc/Authorization", + "issuer": "https://{{ hubs_oidc_url }}/openidc/", "client_secret": "{{ hubs_stg_oidc_secret }}", - "token_uri": "https://id.stg.fedoraproject.org/openidc/Token", - "userinfo_uri": "https://id.stg.fedoraproject.org/openidc/UserInfo", + "token_uri": "https://{{ hubs_oidc_url }}/openidc/Token", + "userinfo_uri": "https://{{ hubs_oidc_url }}/openidc/UserInfo", "redirect_uris": [ - "https://hubs.stg.fedoraproject.org/oidc_callback" + "{{ hubs_url }}/oidc_callback" ] } }