mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-08-03 04:34:33 -07:00
Allow overrides for service start retries and delay
This commit is contained in:
parent
d8f26dc6e7
commit
646ec53be8
5 changed files with 18 additions and 9 deletions
|
@ -1,7 +1,8 @@
|
||||||
---
|
---
|
||||||
dependency:
|
dependency:
|
||||||
name: shell
|
name: galaxy
|
||||||
command: ansible-galaxy collection install -r molecule/default/requirements.yml -p $HOME/.ansible/collections --force-with-deps
|
options:
|
||||||
|
requirements-file: molecule/requirements.yml
|
||||||
driver:
|
driver:
|
||||||
name: docker
|
name: docker
|
||||||
lint: |
|
lint: |
|
||||||
|
@ -16,14 +17,12 @@ platforms:
|
||||||
port_bindings:
|
port_bindings:
|
||||||
- "8080/tcp"
|
- "8080/tcp"
|
||||||
- "8443/tcp"
|
- "8443/tcp"
|
||||||
- "8009/tcp"
|
- "8009/tcp"
|
||||||
provisioner:
|
provisioner:
|
||||||
name: ansible
|
name: ansible
|
||||||
config_options:
|
config_options:
|
||||||
defaults:
|
defaults:
|
||||||
interpreter_python: auto_silent
|
interpreter_python: auto_silent
|
||||||
ssh_connection:
|
|
||||||
pipelining: false
|
|
||||||
playbooks:
|
playbooks:
|
||||||
prepare: prepare.yml
|
prepare: prepare.yml
|
||||||
converge: converge.yml
|
converge: converge.yml
|
||||||
|
@ -33,7 +32,7 @@ provisioner:
|
||||||
localhost:
|
localhost:
|
||||||
ansible_python_interpreter: "{{ ansible_playbook_python }}"
|
ansible_python_interpreter: "{{ ansible_playbook_python }}"
|
||||||
env:
|
env:
|
||||||
ANSIBLE_FORCE_COLOR: "true"
|
ANSIBLE_FORCE_COLOR: "true"
|
||||||
verifier:
|
verifier:
|
||||||
name: ansible
|
name: ansible
|
||||||
scenario:
|
scenario:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
### Configuration specific to keycloak
|
### Configuration specific to keycloak
|
||||||
keycloak_version: 18.0.2
|
keycloak_version: 18.0.2
|
||||||
keycloak_archive: "keycloak-legacy-{{ keycloak_version }}.zip"
|
keycloak_archive: "keycloak-legacy-{{ keycloak_version }}.zip"
|
||||||
keycloak_download_url: "https://github.com/keycloak/keycloak/releases/download/{{ keycloak_version }}/{{ keycloak_archive }}"
|
keycloak_download_url: "https://github.com/keycloak/keycloak/releases/download/{{ keycloak_version }}/{{ keycloak_archive }}"
|
||||||
keycloak_download_url_9x: "https://downloads.jboss.org/keycloak/{{ keycloak_version }}/{{ keycloak_archive }}"
|
keycloak_download_url_9x: "https://downloads.jboss.org/keycloak/{{ keycloak_version }}/{{ keycloak_archive }}"
|
||||||
keycloak_installdir: "{{ keycloak_dest }}/keycloak-{{ keycloak_version }}"
|
keycloak_installdir: "{{ keycloak_dest }}/keycloak-{{ keycloak_version }}"
|
||||||
keycloak_offline_install: False
|
keycloak_offline_install: False
|
||||||
|
@ -21,6 +21,8 @@ keycloak_service_group: keycloak
|
||||||
keycloak_service_pidfile: "/run/keycloak.pid"
|
keycloak_service_pidfile: "/run/keycloak.pid"
|
||||||
keycloak_service_name: keycloak
|
keycloak_service_name: keycloak
|
||||||
keycloak_service_desc: Keycloak
|
keycloak_service_desc: Keycloak
|
||||||
|
keycloak_service_start_delay: 10
|
||||||
|
keycloak_service_start_retries: 25
|
||||||
|
|
||||||
keycloak_configure_firewalld: False
|
keycloak_configure_firewalld: False
|
||||||
|
|
||||||
|
|
|
@ -266,6 +266,14 @@ argument_specs:
|
||||||
default: "Keycloak"
|
default: "Keycloak"
|
||||||
description: "systemd description for keycloak"
|
description: "systemd description for keycloak"
|
||||||
type: "str"
|
type: "str"
|
||||||
|
keycloak_service_start_delay:
|
||||||
|
default: "10"
|
||||||
|
description: "Expected delay in ms before the service is expected to be available after start."
|
||||||
|
type: "int"
|
||||||
|
keycloak_service_start_retries:
|
||||||
|
default: "25"
|
||||||
|
description: "How many time should Ansible retry to connect to the service after it was started, before failing."
|
||||||
|
type: "int"
|
||||||
keycloak_no_log:
|
keycloak_no_log:
|
||||||
default: true
|
default: true
|
||||||
type: "bool"
|
type: "bool"
|
||||||
|
|
|
@ -11,5 +11,5 @@
|
||||||
url: "{{ keycloak.health_url }}"
|
url: "{{ keycloak.health_url }}"
|
||||||
register: keycloak_status
|
register: keycloak_status
|
||||||
until: keycloak_status.status == 200
|
until: keycloak_status.status == 200
|
||||||
retries: 25
|
retries: "{{ keycloak_service_start_retries }}"
|
||||||
delay: 10
|
delay: "{{ keycloak_service_start_delay }}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue