mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-07-30 00:21:36 -07:00
#188: fail early when no keytool
installed
This commit is contained in:
parent
0ee29eb483
commit
c38642e0cd
2 changed files with 14 additions and 12 deletions
|
@ -1,16 +1,4 @@
|
||||||
---
|
---
|
||||||
- name: "Check if keytool exists in path"
|
|
||||||
block:
|
|
||||||
- name: "Attempt to run keytool"
|
|
||||||
ansible.builtin.command: keytool -help
|
|
||||||
register: keytool_check
|
|
||||||
ignore_errors: true
|
|
||||||
|
|
||||||
- name: "Fail when no keytool found"
|
|
||||||
when: keytool_check.rc != 0
|
|
||||||
ansible.builtin.fail:
|
|
||||||
msg: "keytool NOT found in the PATH, but is required for setting up the configuration key store"
|
|
||||||
|
|
||||||
- name: "Initialize configuration key store variables to be written"
|
- name: "Initialize configuration key store variables to be written"
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
store_items:
|
store_items:
|
||||||
|
|
|
@ -42,3 +42,17 @@
|
||||||
ansible.builtin.include_tasks: fastpackages.yml
|
ansible.builtin.include_tasks: fastpackages.yml
|
||||||
vars:
|
vars:
|
||||||
packages_list: "{{ keycloak_quarkus_prereq_package_list }}"
|
packages_list: "{{ keycloak_quarkus_prereq_package_list }}"
|
||||||
|
|
||||||
|
- name: "Validate keytool"
|
||||||
|
when: keycloak.config_key_store_enabled
|
||||||
|
block:
|
||||||
|
- name: "Attempt to run keytool"
|
||||||
|
changed_when: false
|
||||||
|
ansible.builtin.command: keytool -help
|
||||||
|
register: keytool_check
|
||||||
|
ignore_errors: true
|
||||||
|
|
||||||
|
- name: "Fail when no keytool found"
|
||||||
|
when: keytool_check.rc != 0
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: "keytool NOT found in the PATH, but is required for setting up the configuration key store"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue