mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-07 05:37:59 +00:00
Add new Shopware 6 role with OIDC/LDAP plugin integration and Docker-based deployment configuration.
Includes: - New role: web-app-shopware (Docker, MariaDB, Redis, OpenSearch) - Updated networks and ports configuration - Automated install, migration, and admin creation - Optional IAM integration via OIDC/LDAP plugins Reference: https://chatgpt.com/share/6907b0d4-ab14-800f-b576-62c0d26c8ad1
This commit is contained in:
27
roles/web-app-shopware/tasks/setup/ldap.yml
Normal file
27
roles/web-app-shopware/tasks/setup/ldap.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
# Replace INFX_LDAP_PLUGIN with the actual plugin name you use
|
||||
- name: "Install LDAP admin plugin & activate"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_PHP_CONTAINER }} bash -lc '
|
||||
set -e
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate INFX_LDAP_PLUGIN || true
|
||||
php bin/console cache:clear
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
|
||||
- name: "Configure LDAP connection"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_PHP_CONTAINER }} bash -lc '
|
||||
set -e
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
php bin/console system:config:set "InfxLdap.config.host" "{{ LDAP.SERVER.DOMAIN }}"
|
||||
php bin/console system:config:set "InfxLdap.config.port" "{{ LDAP.SERVER.PORT }}"
|
||||
php bin/console system:config:set "InfxLdap.config.bindDn" "{{ LDAP.DN.ADMINISTRATOR.DATA }}"
|
||||
php bin/console system:config:set "InfxLdap.config.password" "{{ LDAP.BIND_CREDENTIAL }}"
|
||||
php bin/console system:config:set "InfxLdap.config.userBase" "{{ LDAP.DN.OU.USERS }}"
|
||||
php bin/console cache:clear
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
26
roles/web-app-shopware/tasks/setup/oidc.yml
Normal file
26
roles/web-app-shopware/tasks/setup/oidc.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
# Replace INFX_OIDC_PLUGIN with the actual plugin name (Composer or local)
|
||||
- name: "Install OIDC plugin & activate"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_PHP_CONTAINER }} bash -lc '
|
||||
set -e
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
php bin/console plugin:refresh
|
||||
php bin/console plugin:install --activate INFX_OIDC_PLUGIN || true
|
||||
php bin/console cache:clear
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
|
||||
- name: "Configure OIDC via system:config"
|
||||
shell: |
|
||||
docker exec -i --user {{ SHOPWARE_USER }} {{ SHOPWARE_PHP_CONTAINER }} bash -lc '
|
||||
set -e
|
||||
cd {{ SHOPWARE_ROOT }}
|
||||
php bin/console system:config:set "InfxOidc.config.clientId" "{{ OIDC.CLIENT.ID }}"
|
||||
php bin/console system:config:set "InfxOidc.config.clientSecret" "{{ OIDC.CLIENT.SECRET }}"
|
||||
php bin/console system:config:set "InfxOidc.config.discoveryUrl" "{{ OIDC.CLIENT.DISCOVERY_DOCUMENT }}"
|
||||
php bin/console system:config:set "InfxOidc.config.scopes" "openid profile email"
|
||||
php bin/console cache:clear
|
||||
'
|
||||
args:
|
||||
chdir: "{{ docker_compose.directories.instance }}"
|
||||
Reference in New Issue
Block a user