diff --git a/roles/keycloak/files/keycloak-proxy-config.cli b/roles/keycloak/files/keycloak-proxy-config.cli deleted file mode 100644 index 7ce2074..0000000 --- a/roles/keycloak/files/keycloak-proxy-config.cli +++ /dev/null @@ -1,5 +0,0 @@ -embed-server - -/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=proxy-address-forwarding,value=true) -/socket-binding-group=standard-sockets/socket-binding=proxy-https:add(port=443) -/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=redirect-socket,value=proxy-https) diff --git a/roles/keycloak/files/keycloak.service b/roles/keycloak/files/keycloak.service index 0ff259c..0e026dd 100644 --- a/roles/keycloak/files/keycloak.service +++ b/roles/keycloak/files/keycloak.service @@ -6,7 +6,7 @@ After=network.target Type=idle User=keycloak Group=keycloak -ExecStart=/opt/keycloak-22.0.1/bin/kc.sh start --hostname-strict=false --http-enabled=true +ExecStart=/opt/keycloak-22.0.1/bin/kc.sh start --hostname-strict=false --http-enabled=true --proxy=edge --hostname=ood-idp.flexi.nesi EnvironmentFile=/etc/default/keycloak TimeoutStartSec=600 TimeoutStopSec=600 diff --git a/roles/keycloak/tasks/main.yml b/roles/keycloak/tasks/main.yml index 43a52b8..138203c 100644 --- a/roles/keycloak/tasks/main.yml +++ b/roles/keycloak/tasks/main.yml @@ -42,12 +42,6 @@ owner: root group: root mode: '600' -- name: Keycloak proxy configuration - lineinfile: - path: /opt/keycloak-22.0.1/conf/keycloak.conf - line: proxy=edge - owner: keycloak - group: keycloak - name: Copy keycloak system service file copy: src: keycloak.service @@ -55,6 +49,7 @@ owner: root group: root register: keycloak_service_file + notify: restart apache - name: Restart keycloak service systemd: name: keycloak