update for sso setup
diff --git a/defaults/main.yml b/defaults/main.yml
index 8633745..da66f9b 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -1,2 +1,13 @@
---
-# defaults file for apigee-opdk-setup-edge-saml-config/
\ No newline at end of file
+# defaults file for apigee-opdk-setup-edge-saml-config/
+edgeui_response_file_name: edge-ui-sample-response.conf
+edgeui_response_file_path: "{{ opdk_installer_path }}/{{ edgeui_response_file_name }}"
+edgeui_public_uris: http://{{ local_mgmt_ip }}:9000
+edgeui_sso_enabled: y
+sso_public_url_port: 9099
+sso_public_url_scheme: http
+sso_admin_name: ssoadmin
+sso_admin_secret: Apigee123!
+edgeui_sso_client_name: edgeui
+edgeui_sso_client_secret: Apigee123!
+edgeui_sso_client_overwrite: y
diff --git a/meta/main.yml b/meta/main.yml
index 7223799..feb7ebf 100644
--- a/meta/main.yml
+++ b/meta/main.yml
@@ -52,6 +52,7 @@
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
-dependencies: []
+dependencies:
+- { role: apigee-opdk-modules }
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
\ No newline at end of file
diff --git a/tasks/main.yml b/tasks/main.yml
index 6863928..3343144 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -1,2 +1,16 @@
---
-# tasks file for apigee-opdk-setup-edge-saml-config/
\ No newline at end of file
+# tasks file for apigee-opdk-setup-edge-saml-config/
+
+- name: Update cache with key and value
+ cache:
+ key: "{{ item.key }}"
+ value: "{{ item.value }}"
+ with_items:
+ - { key: 'edgeui_response_file_path', value: '{{ edgeui_response_file_path }}' }
+ - { key: 'edgeui_public_uris', value: '{{ edgeui_public_uris }}' }
+
+- name: Create Edge UI Response File
+ template:
+ src: "{{ edgeui_response_filename }}"
+ dest: "{{ edgeui_response_file_path }}"
+ mode: 0644
diff --git a/templates/edge-ui-saml-response.conf.j2 b/templates/edge-ui-saml-response.conf.j2
index 613a544..83ba480 100644
--- a/templates/edge-ui-saml-response.conf.j2
+++ b/templates/edge-ui-saml-response.conf.j2
@@ -1,37 +1,35 @@
-IP1=hostname_or_ip_of_apigge_sso
-
# Comma separated list of URLs for the Edge UI,
# in the format: http_or_https://IP_or_hostname_of_UI:9000.
# You can have multiple URLs when you have multiple installations
# of the Edge UI or you have multiple data centers.
-EDGEUI_PUBLIC_URIS=http_or_https://IP_or_hostname_of_UI:9000
+EDGEUI_PUBLIC_URIS={{ edgeui_public_uris }}
# Publicly accessible URLs for Edge UI.
-EDGEUI_SSO_REGISTERD_PUBLIC_URIS=$EDGEUI_PUBLIC_URIS
+EDGEUI_SSO_REGISTERD_PUBLIC_URIS={{ edgeui_public_uris }}
# Required variables
# Default is "n" to disable SAML support.
-EDGEUI_SSO_ENABLED=y
+EDGEUI_SSO_ENABLED={{ edgeui_sso_enabled }}
# Information about apigee-sso.
# Externally accessible IP or DNS of apigee-sso.
-SSO_PUBLIC_URL_HOSTNAME=$IP1
-SSO_PUBLIC_URL_PORT=9099
+SSO_PUBLIC_URL_HOSTNAME={{ pgmaster_ip | default(pg_ip) }}
+SSO_PUBLIC_URL_PORT={{ sso_public_url_port }}
# Default is http. Set to https if you enabled TLS on apigee-sso.
-SSO_PUBLIC_URL_SCHEME=http
+SSO_PUBLIC_URL_SCHEME={{ sso_public_url_scheme }}
# SSO admin credentials as set when you installed apigee-sso.
-SSO_ADMIN_NAME=ssoadmin
-SSO_ADMIN_SECRET=Secret123
+SSO_ADMIN_NAME={{ sso_admin_name }}
+SSO_ADMIN_SECRET={{ sso_admin_secret }}
# The name of the OAuth client used to connect to apigee-sso.
# The default client name is edgeui.
-EDGEUI_SSO_CLIENT_NAME=edgeui
+EDGEUI_SSO_CLIENT_NAME={{ edgeui_sso_client_name }}
# Oauth client password using uppercase, lowercase, number, and special chars.
-EDGEUI_SSO_CLIENT_SECRET=ssoClient123
+EDGEUI_SSO_CLIENT_SECRET={{ edgeui_sso_client_secret }}
# If set, the existing EDGEUI client is deleted and new one is created.
# The default value is "n".
# Set to "y" when you configure SAML and change the value of
# any of the EDGEUI_* properties.
-EDGEUI_SSO_CLIENT_OVERWRITE=y
\ No newline at end of file
+EDGEUI_SSO_CLIENT_OVERWRITE={{ edgeui_sso_client_overwrite }}
\ No newline at end of file