Skip to content

Commit

Permalink
Merge pull request #10 from sitewards/adding-sso-and-sap
Browse files Browse the repository at this point in the history
Adhoc adding sso and sap credentials
  • Loading branch information
toxix authored Dec 18, 2019
2 parents 7c557e0 + 4c67410 commit cedbc3e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
13 changes: 13 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,16 @@ magento_clones_cleanup_min_age: "1d"
## by default indexer will run only in case database was created from scratch.
## In case you need to refresh indexes on deploy (e.g. to fill search index) - set this to true.
magento_force_reindex_on_deploy: False

## Set SSO Credentials
#magento_sso_oauth_credentials:
# domain: '***'
# client_id: '****'
# client_secret: '***'

## Set additional project specific configuration can be added
#magento_additional_configuration: |
# here is your multiline content for env.php,
# and more
# and more
# and more
6 changes: 6 additions & 0 deletions tasks/installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,12 @@
EOF
with_items: "{{ magento_core_config_data }}"

- name: "Configure webSSO"
become: "yes"
become_user: "{{ magento_user }}"
command: "/usr/bin/php {{ magento_app_root }}/bin/magento websso:configure"
when: magento_sso_oauth_credentials is defined

- name: "Flush the Magento caches"
become: "yes"
become_user: "{{ magento_user }}"
Expand Down
13 changes: 12 additions & 1 deletion templates/etc/env.php.j2
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@ return array (
{% if magento_run_message_queue_consumers_separately %}
'cron_consumers_runner' => array(
'cron_run' => false
)
),
{% endif %}
{% if magento_sso_oauth_credentials is defined %}
'websso_oauth' =>
array (
'domain' => '{{ magento_sso_oauth_credentials.domain }}',
'client_id' => '{{ magento_sso_oauth_credentials.client_id }}',
'client_secret' => '{{ magento_sso_oauth_credentials.client_secret }}',
),
{% endif %}
{% if magento_additional_configuration is defined %}
{{ magento_additional_configuration }}
{% endif %}
);

0 comments on commit cedbc3e

Please sign in to comment.