mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-07-28 23:51:34 -07:00
Add ansible_family based vars loading
This commit is contained in:
parent
c1da6ea38d
commit
dd6171f024
5 changed files with 43 additions and 8 deletions
|
@ -6,7 +6,7 @@
|
|||
quiet: true
|
||||
fail_msg: "The console administrator password is empty or invalid. Please set the keycloak_quarkus_admin_pass variable to a 12+ char long string"
|
||||
success_msg: "{{ 'Console administrator password OK' }}"
|
||||
|
||||
|
||||
- name: Validate relative path
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
|
@ -23,12 +23,20 @@
|
|||
fail_msg: "Cannot install HA setup without a backend database service. Check keycloak_quarkus_ha_enabled and keycloak_quarkus_db_enabled"
|
||||
success_msg: "{{ 'Configuring HA' if keycloak_quarkus_ha_enabled else 'Configuring standalone' }}"
|
||||
|
||||
- name: Validate OS family
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_os_family in ["RedHat", "Debian"]
|
||||
quiet: true
|
||||
fail_msg: "Can only install on RedHat or Debian OS families; found {{ ansible_os_family }}"
|
||||
success_msg: "Installing on {{ ansible_os_family }}"
|
||||
|
||||
- name: Load OS specific variables
|
||||
ansible.builtin.include_vars: "vars/{{ ansible_os_family | lower }}.yml"
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Ensure required packages are installed
|
||||
ansible.builtin.include_tasks: fastpackages.yml
|
||||
vars:
|
||||
packages_list:
|
||||
- "{{ keycloak_quarkus_jvm_package }}"
|
||||
- unzip
|
||||
- "{{ 'procps-ng' if ansible_facts.os_family == 'RedHat' else 'procps' }}"
|
||||
- "{{ 'initscripts' if ansible_facts.os_family == 'RedHat' else 'apt' }}"
|
||||
- "{{ 'tzdata-java' if ansible_facts.os_family == 'RedHat' else 'tzdata' }}"
|
||||
packages_list: "{{ keycloak_prereq_package_list }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue