Merge pull request #3 from ansible-middleware/refactor_standalone_xml
Allow to change default standalone.xml path and namemain
commit
52ca7083a4
|
@ -16,6 +16,10 @@ keycloak_rhsso_base_url: 'https://access.redhat.com/jbossnetwork/restricted/soft
|
||||||
keycloak_dest: /opt/keycloak
|
keycloak_dest: /opt/keycloak
|
||||||
keycloak_jboss_home: "{{ keycloak_rhsso_installdir if rhsso_rhn_id is defined else keycloak_installdir }}"
|
keycloak_jboss_home: "{{ keycloak_rhsso_installdir if rhsso_rhn_id is defined else keycloak_installdir }}"
|
||||||
keycloak_config_dir: "{{ keycloak_jboss_home }}/standalone/configuration"
|
keycloak_config_dir: "{{ keycloak_jboss_home }}/standalone/configuration"
|
||||||
|
|
||||||
|
keycloak_config_standalone_xml: "keycloak.xml"
|
||||||
|
keycloak_config_path_to_standalone_xml: "{{ keycloak_jboss_home }}/standalone/configuration/{{ keycloak_config_standalone_xml }}"
|
||||||
|
|
||||||
keycloak_service_user: keycloak
|
keycloak_service_user: keycloak
|
||||||
keycloak_service_group: keycloak
|
keycloak_service_group: keycloak
|
||||||
keycloak_service_pidfile: "/run/keycloak.pid"
|
keycloak_service_pidfile: "/run/keycloak.pid"
|
||||||
|
@ -58,4 +62,4 @@ postgres_db_user: keycloak-user
|
||||||
postgres_db_pass: keycloak-pass
|
postgres_db_pass: keycloak-pass
|
||||||
mariadb_jdbc_url: 'jdbc:mariadb://localhost:3306/keycloak'
|
mariadb_jdbc_url: 'jdbc:mariadb://localhost:3306/keycloak'
|
||||||
mariadb_db_user: keycloak-user
|
mariadb_db_user: keycloak-user
|
||||||
mariadb_db_pass: keycloak-pass
|
mariadb_db_pass: keycloak-pass
|
||||||
|
|
|
@ -130,7 +130,7 @@
|
||||||
become: yes
|
become: yes
|
||||||
template:
|
template:
|
||||||
src: "{{ 'templates/standalone-rhsso.xml.j2' if keycloak_rhsso_enable else 'templates/standalone.xml.j2' }}"
|
src: "{{ 'templates/standalone-rhsso.xml.j2' if keycloak_rhsso_enable else 'templates/standalone.xml.j2' }}"
|
||||||
dest: "{{ keycloak_jboss_home }}/standalone/configuration/standalone.xml"
|
dest: "{{ keycloak_config_path_to_standalone_xml }}"
|
||||||
owner: "{{ keycloak_service_user }}"
|
owner: "{{ keycloak_service_user }}"
|
||||||
group: "{{ keycloak_service_group }}"
|
group: "{{ keycloak_service_group }}"
|
||||||
mode: 0640
|
mode: 0640
|
||||||
|
@ -142,7 +142,7 @@
|
||||||
become: yes
|
become: yes
|
||||||
template:
|
template:
|
||||||
src: "{{ 'templates/standalone-rhsso-jdg.xml.j2' if keycloak_rhsso_enable else 'templates/standalone-infinispan.xml.j2' }}"
|
src: "{{ 'templates/standalone-rhsso-jdg.xml.j2' if keycloak_rhsso_enable else 'templates/standalone-infinispan.xml.j2' }}"
|
||||||
dest: "{{ keycloak_jboss_home }}/standalone/configuration/standalone.xml"
|
dest: "{{ keycloak_config_path_to_standalone_xml }}"
|
||||||
owner: "{{ keycloak_service_user }}"
|
owner: "{{ keycloak_service_user }}"
|
||||||
group: "{{ keycloak_service_group }}"
|
group: "{{ keycloak_service_group }}"
|
||||||
mode: 0640
|
mode: 0640
|
||||||
|
|
|
@ -83,6 +83,7 @@ startKeycloak() {
|
||||||
-Djboss.management.https.port=${KEYCLOAK_MANAGEMENT_HTTPS_PORT} \
|
-Djboss.management.https.port=${KEYCLOAK_MANAGEMENT_HTTPS_PORT} \
|
||||||
-Djboss.node.name={{ inventory_hostname }} \
|
-Djboss.node.name={{ inventory_hostname }} \
|
||||||
{% if ansible_facts.virtualization_type in ['docker','oci','containerd'] %}-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true {% endif %}\
|
{% if ansible_facts.virtualization_type in ['docker','oci','containerd'] %}-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses=true {% endif %}\
|
||||||
|
{% if keycloak_config_standalone_xml is defined %}--server-config={{ keycloak_config_standalone_xml }}{% endif %} \
|
||||||
2>&1 >> "${KEYCLOAK_LOGFILE}" &
|
2>&1 >> "${KEYCLOAK_LOGFILE}" &
|
||||||
while [ ! -f ${KEYCLOAK_PIDFILE} ]; do sleep 1; done
|
while [ ! -f ${KEYCLOAK_PIDFILE} ]; do sleep 1; done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue