mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-04-09 04:10:27 -07:00
Merge pull request #45 from generalpax/patch-1
keycloak_quarkus: variable to enable development mode
This commit is contained in:
commit
9157f83f96
7 changed files with 17 additions and 7 deletions
|
@ -5,7 +5,7 @@
|
||||||
keycloak_quarkus_admin_pass: "remembertochangeme"
|
keycloak_quarkus_admin_pass: "remembertochangeme"
|
||||||
keycloak_admin_password: "remembertochangeme"
|
keycloak_admin_password: "remembertochangeme"
|
||||||
keycloak_realm: TestRealm
|
keycloak_realm: TestRealm
|
||||||
keycloak_quarkus_host: instance:8443
|
keycloak_quarkus_host: instance
|
||||||
keycloak_quarkus_http_relative_path: ''
|
keycloak_quarkus_http_relative_path: ''
|
||||||
keycloak_quarkus_log: file
|
keycloak_quarkus_log: file
|
||||||
keycloak_quarkus_https_enabled: True
|
keycloak_quarkus_https_enabled: True
|
||||||
|
|
|
@ -25,10 +25,10 @@
|
||||||
- name: Verify endpoint URLs
|
- name: Verify endpoint URLs
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- (openid_config.stdout | from_json)["backchannel_authentication_endpoint"] == 'https://instance:8443/realms/master/protocol/openid-connect/ext/ciba/auth'
|
- (openid_config.stdout | from_json)["backchannel_authentication_endpoint"] == 'https://instance/realms/master/protocol/openid-connect/ext/ciba/auth'
|
||||||
- (openid_config.stdout | from_json)['issuer'] == 'https://instance:8443/realms/master'
|
- (openid_config.stdout | from_json)['issuer'] == 'https://instance/realms/master'
|
||||||
- (openid_config.stdout | from_json)['authorization_endpoint'] == 'https://instance:8443/realms/master/protocol/openid-connect/auth'
|
- (openid_config.stdout | from_json)['authorization_endpoint'] == 'https://instance/realms/master/protocol/openid-connect/auth'
|
||||||
- (openid_config.stdout | from_json)['token_endpoint'] == 'https://instance:8443/realms/master/protocol/openid-connect/token'
|
- (openid_config.stdout | from_json)['token_endpoint'] == 'https://instance/realms/master/protocol/openid-connect/token'
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
when:
|
when:
|
||||||
- hera_home is defined
|
- hera_home is defined
|
||||||
|
|
|
@ -97,6 +97,7 @@ Role Defaults
|
||||||
|`keycloak_quarkus_log_file`| Set the log file path and filename relative to keycloak home | `data/log/keycloak.log` |
|
|`keycloak_quarkus_log_file`| Set the log file path and filename relative to keycloak home | `data/log/keycloak.log` |
|
||||||
|`keycloak_quarkus_log_format`| Set a format specific to file log entries | `%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n` |
|
|`keycloak_quarkus_log_format`| Set a format specific to file log entries | `%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n` |
|
||||||
|`keycloak_quarkus_proxy_mode`| The proxy address forwarding mode if the server is behind a reverse proxy | `edge` |
|
|`keycloak_quarkus_proxy_mode`| The proxy address forwarding mode if the server is behind a reverse proxy | `edge` |
|
||||||
|
|`keycloak_quarkus_start_dev`| Whether to start the service in development mode (start-dev) | `False` |
|
||||||
|
|
||||||
|
|
||||||
Role Variables
|
Role Variables
|
||||||
|
|
|
@ -14,6 +14,7 @@ keycloak_quarkus_java_home:
|
||||||
keycloak_quarkus_dest: /opt/keycloak
|
keycloak_quarkus_dest: /opt/keycloak
|
||||||
keycloak_quarkus_home: "{{ keycloak_quarkus_installdir }}"
|
keycloak_quarkus_home: "{{ keycloak_quarkus_installdir }}"
|
||||||
keycloak_quarkus_config_dir: "{{ keycloak_quarkus_home }}/conf"
|
keycloak_quarkus_config_dir: "{{ keycloak_quarkus_home }}/conf"
|
||||||
|
keycloak_quarkus_start_dev: False
|
||||||
keycloak_quarkus_service_user: keycloak
|
keycloak_quarkus_service_user: keycloak
|
||||||
keycloak_quarkus_service_group: keycloak
|
keycloak_quarkus_service_group: keycloak
|
||||||
keycloak_quarkus_service_pidfile: "/run/keycloak.pid"
|
keycloak_quarkus_service_pidfile: "/run/keycloak.pid"
|
||||||
|
|
|
@ -244,3 +244,7 @@ argument_specs:
|
||||||
default: 'edge'
|
default: 'edge'
|
||||||
type: "str"
|
type: "str"
|
||||||
description: "The proxy address forwarding mode if the server is behind a reverse proxy"
|
description: "The proxy address forwarding mode if the server is behind a reverse proxy"
|
||||||
|
keycloak_quarkus_start_dev:
|
||||||
|
default: False
|
||||||
|
type: "bool"
|
||||||
|
description: "Whether to start the service in development mode (start-dev)"
|
||||||
|
|
|
@ -7,7 +7,11 @@ After=network.target
|
||||||
Type=simple
|
Type=simple
|
||||||
EnvironmentFile=-/etc/sysconfig/keycloak
|
EnvironmentFile=-/etc/sysconfig/keycloak
|
||||||
PIDFile={{ keycloak_quarkus_service_pidfile }}
|
PIDFile={{ keycloak_quarkus_service_pidfile }}
|
||||||
|
{% if keycloak_quarkus_start_dev %}
|
||||||
|
ExecStart={{ keycloak.home }}/bin/kc.sh start-dev
|
||||||
|
{% else %}
|
||||||
ExecStart={{ keycloak.home }}/bin/kc.sh start --auto-build --log={{ keycloak_quarkus_log }}
|
ExecStart={{ keycloak.home }}/bin/kc.sh start --auto-build --log={{ keycloak_quarkus_log }}
|
||||||
|
{% endif %}
|
||||||
User={{ keycloak.service_user }}
|
User={{ keycloak.service_user }}
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -4,7 +4,7 @@ keycloak:
|
||||||
config_dir: "{{ keycloak_quarkus_config_dir }}"
|
config_dir: "{{ keycloak_quarkus_config_dir }}"
|
||||||
bundle: "{{ keycloak_quarkus_archive }}"
|
bundle: "{{ keycloak_quarkus_archive }}"
|
||||||
service_name: "keycloak"
|
service_name: "keycloak"
|
||||||
health_url: "http://localhost:8080/realms/master/.well-known/openid-configuration"
|
health_url: "http://{{ keycloak_quarkus_host }}:{{ keycloak_quarkus_http_port }}/realms/master/.well-known/openid-configuration"
|
||||||
cli_path: "{{ keycloak_quarkus_home }}/bin/kcadm.sh"
|
cli_path: "{{ keycloak_quarkus_home }}/bin/kcadm.sh"
|
||||||
service_user: "{{ keycloak_quarkus_service_user }}"
|
service_user: "{{ keycloak_quarkus_service_user }}"
|
||||||
service_group: "{{ keycloak_quarkus_service_group }}"
|
service_group: "{{ keycloak_quarkus_service_group }}"
|
||||||
|
@ -12,4 +12,4 @@ keycloak:
|
||||||
log:
|
log:
|
||||||
file: "{{ keycloak_quarkus_home }}/{{ keycloak_quarkus_log_file }}"
|
file: "{{ keycloak_quarkus_home }}/{{ keycloak_quarkus_log_file }}"
|
||||||
level: "{{ keycloak_quarkus_log_level }}"
|
level: "{{ keycloak_quarkus_log_level }}"
|
||||||
format: "{{ keycloak_quarkus_log_format }}"
|
format: "{{ keycloak_quarkus_log_format }}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue