mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2025-08-06 14:14:30 -07:00
Comprehensive linter warning fixes
This commit is contained in:
parent
d17c364257
commit
1f910bd400
17 changed files with 62 additions and 41 deletions
|
@ -8,7 +8,8 @@
|
|||
|
||||
- name: "Add missing packages to the yum install list"
|
||||
ansible.builtin.set_fact:
|
||||
packages_to_install: "{{ packages_to_install | default([]) + rpm_info.stdout_lines | map('regex_findall', 'package (.+) is not installed$') | default([]) | flatten }}"
|
||||
packages_to_install: "{{ packages_to_install | default([]) + rpm_info.stdout_lines | \
|
||||
map('regex_findall', 'package (.+) is not installed$') | default([]) | flatten }}"
|
||||
when: ansible_facts.os_family == "RedHat"
|
||||
|
||||
- name: "Install packages: {{ packages_to_install }}"
|
||||
|
@ -17,8 +18,8 @@
|
|||
name: "{{ packages_to_install }}"
|
||||
state: present
|
||||
when:
|
||||
- packages_to_install | default([]) | length > 0
|
||||
- ansible_facts.os_family == "RedHat"
|
||||
- packages_to_install | default([]) | length > 0
|
||||
- ansible_facts.os_family == "RedHat"
|
||||
|
||||
- name: "Install packages: {{ packages_list }}"
|
||||
become: true
|
||||
|
|
|
@ -132,7 +132,7 @@
|
|||
register: path_to_workdir
|
||||
become: true
|
||||
|
||||
- name: "Extract Keycloak archive on target"
|
||||
- name: "Extract Keycloak archive on target" # noqa no-handler need to run this here
|
||||
ansible.builtin.unarchive:
|
||||
remote_src: true
|
||||
src: "{{ archive }}"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
|
||||
- name: "Retrieve JDBC Driver from {{ keycloak_jdbc[keycloak_quarkus_jdbc_engine].driver_jar_url }}"
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ keycloak_quarkus_default_jdbc[keycloak_quarkus_jdbc_engine].driver_jar_url }}"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
that:
|
||||
- keycloak_quarkus_admin_pass | length > 12
|
||||
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"
|
||||
fail_msg: "The console administrator password is empty or invalid. Please set the keycloak_quarkus_admin_pass to a 12+ char long string"
|
||||
success_msg: "{{ 'Console administrator password OK' }}"
|
||||
|
||||
- name: Validate relative path
|
||||
|
@ -12,15 +12,17 @@
|
|||
that:
|
||||
- keycloak_quarkus_http_relative_path is regex('^/.*')
|
||||
quiet: true
|
||||
fail_msg: "the relative path must begin with /"
|
||||
success_msg: "{{ 'relative path OK' }}"
|
||||
fail_msg: "The relative path for keycloak_quarkus_http_relative_path must begin with /"
|
||||
success_msg: "{{ 'Relative path OK' }}"
|
||||
|
||||
- name: Validate configuration
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- (keycloak_quarkus_ha_enabled and keycloak_quarkus_db_enabled) or (not keycloak_quarkus_ha_enabled and keycloak_quarkus_db_enabled) or (not keycloak_quarkus_ha_enabled and not keycloak_quarkus_db_enabled)
|
||||
- (keycloak_quarkus_ha_enabled and keycloak_quarkus_db_enabled) or
|
||||
(not keycloak_quarkus_ha_enabled and keycloak_quarkus_db_enabled) or
|
||||
(not keycloak_quarkus_ha_enabled and not keycloak_quarkus_db_enabled)
|
||||
quiet: true
|
||||
fail_msg: "Cannot install HA setup without a backend database service. Check keycloak_quarkus_ha_enabled and keycloak_quarkus_db_enabled"
|
||||
fail_msg: "HA setup requires 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
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
group: root
|
||||
mode: '0640'
|
||||
vars:
|
||||
keycloak_pkg_java_home: "{{ keycloak_quarkus_pkg_java_home }}"
|
||||
keycloak_sys_pkg_java_home: "{{ keycloak_quarkus_pkg_java_home }}"
|
||||
notify:
|
||||
- restart keycloak
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue