From 8895bc8e1f52900807e386133a58acff683d82d6 Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Thu, 27 Jan 2022 13:23:00 +0100 Subject: [PATCH] remove unused vars, document used vars --- roles/keycloak/README.md | 9 +++++++++ roles/keycloak/defaults/main.yml | 3 --- roles/keycloak/tasks/install.yml | 5 ----- roles/keycloak/vars/main.yml | 6 ++++++ 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/roles/keycloak/README.md b/roles/keycloak/README.md index 6143446..680bcc8 100644 --- a/roles/keycloak/README.md +++ b/roles/keycloak/README.md @@ -11,6 +11,7 @@ This role requires the `python3-netaddr` library installed on the controller nod * to install via yum/dnf: `dnf install python3-netaddr` * or via pip: `pip install netaddr==0.8.0` +* or via the collection: `pip install -r requirements.txt` Versions @@ -38,6 +39,11 @@ Role Defaults |`keycloak_management_https_port`| TLS management port | `9993` | |`keycloak_java_opts`| Additional JVM options | `-Xms1024m -Xmx2048m` | |`keycloak_prefer_ipv4`| Prefer IPv4 stack and addresses for port binding | `True` | +|`keycloak_offline_install` | perform an offline install | `False`| +|`keycloak_config_standalone_xml`| filename for configuration | `keycloak.xml` | +|`keycloak_service_user`| posix account username | `keycloak` | +|`keycloak_service_group`| posix account group | `keycloak` | +|`keycloak_service_pidfile`| pid file path for service | `/run/keycloak.pid` | |`jvm_package`| RHEL java package runtime | `java-1.8.0-openjdk-devel` | @@ -77,15 +83,18 @@ The following variables are _required_ only when `keycloak_db_enabled` is True: |`keycloak_db_pass` | password for connecting to postgres | `keycloak-pass` | The following variable can be used to install Keycloak or Red Hat Single Sign-On from local path: + | Variable | Description | Example | |:---------|:------------|:---------| |`zip_file_local_path` | Full local path of upstream(Keycloak) or Red Hat Single Sign-On zip file on Ansible control plane | `tmp/rhsso/rh-sso-7.5-server-dist.zip` | The following variable can be used to install Red Hat Single Sign-On from source via url, auth support is not added right now. + | Variable | Description | Example | |:---------|:------------|:---------| |`rhsso_source_download_url` | URL to download Red Hat Single Sign-On zip file from source | `http://localhost:8081/nexus/rhsso/rh-sso-7.5-server-dist.zip` | + Dependencies ------------ diff --git a/roles/keycloak/defaults/main.yml b/roles/keycloak/defaults/main.yml index c508e74..248cd4a 100644 --- a/roles/keycloak/defaults/main.yml +++ b/roles/keycloak/defaults/main.yml @@ -24,14 +24,11 @@ jvm_package: java-1.8.0-openjdk-devel keycloak_dest: /opt/keycloak keycloak_jboss_home: "{{ keycloak_rhsso_installdir if keycloak_rhsso_enable else keycloak_installdir }}" 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_group: keycloak keycloak_service_pidfile: "/run/keycloak.pid" -keycloak_service_logfile: "{{ keycloak_dest }}/keycloak.log" ### Common configuration settings keycloak_bind_address: 0.0.0.0 diff --git a/roles/keycloak/tasks/install.yml b/roles/keycloak/tasks/install.yml index a346da5..01fc624 100644 --- a/roles/keycloak/tasks/install.yml +++ b/roles/keycloak/tasks/install.yml @@ -9,11 +9,6 @@ - keycloak_version is defined quiet: true -- set_fact: - keycloak_service_group: "{{ keycloak_service_user }}" - when: - - not keycloak_service_group is defined - - name: check for an existing deployment become: yes stat: diff --git a/roles/keycloak/vars/main.yml b/roles/keycloak/vars/main.yml index 40b2610..3f913d8 100644 --- a/roles/keycloak/vars/main.yml +++ b/roles/keycloak/vars/main.yml @@ -12,6 +12,12 @@ rhsso_rhn_ids: keycloak_url: "http://{{ keycloak_host }}:{{ keycloak_http_port }}" keycloak_management_url: "http://{{ keycloak_host }}:{{ keycloak_management_http_port }}" + +keycloak: + home: "{{ keycloak_jboss_home }}" + config_dir: "{{ keycloak_config_dir }}" + + # database keycloak_jdbc: postgres: