Go to file
root 00e6b3601b Updated README.md 2022-01-07 09:16:38 -06:00
.github/workflows Rewrite initd/systemd scripts interaction 2021-12-14 16:01:41 +01:00
meta Add base role and playbook, molecule configuration 2021-12-14 11:26:42 +01:00
molecule/default Extract new keycloak_realm role out of keycloak 2021-12-22 10:05:48 +01:00
playbooks Separate playbooks for installation and configuration 2022-01-07 09:16:38 -06:00
roles Parametrize jdbc driver version 2022-01-05 13:55:19 +01:00
.gitignore Initial commit 2021-12-14 09:54:49 +01:00
.yamllint Fix linter warnings 2021-12-14 11:34:41 +01:00
LICENSE Initial commit 2021-12-14 09:54:49 +01:00
README.md Updated README.md 2022-01-07 09:16:38 -06:00
ansible_hosts Separate playbooks for installation and configuration 2022-01-07 09:16:38 -06:00
galaxy.yml Start work on v0.1.4 2022-01-05 15:24:53 +01:00
requirements.yml Add base role and playbook, molecule configuration 2021-12-14 11:26:42 +01:00

README.md

Ansible Collection - keycloak

Build Status

Collection to install and configure Keycloak or Red Hat Single Sign-On.

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.9.10.

Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions.

Installation

Installing the Collection from Ansible Galaxy

Before using the collection, you need to install it with the Ansible Galaxy CLI:

ansible-galaxy collection install middleware_automation.keycloak

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml, using the format:

---
collections:
  - name: middleware_automation.keycloak

Install Playbook

playbooks/keycloak.yml installs the keycloak or Red Hat Single Sign-On based on the defined variables.

Choosing between Red Hat products and upstream project

The roles supports installing Red Hat Single Sign-On from the Customer Portal, when the following variables are defined:

rhn_username: '<customer_portal_username>'
rhn_password: '<customer_portal_password>'
rhsso_rhn_id: '<sso_product_id>'

where sso_product_id is the ID for the specific Red Hat Single Sign-On version, ie. 101971 will install version 7.5)

Install role

  • keycloak: role for installing the service. Requires: python3-netaddr

Example installation command

Execute the following command from the source root directory

ansible-playbook -i ansible_hosts -e @rhn-creds.yml playbooks/keycloak.yml -e keycloak_admin_password=<changeme>`

Configuration

Config Playbook

playbooks/keycloak-realm.yml creates the realm, provided client(s), client role(s) and client user(s) if they don't exist.

Config role

  • keycloak_realm: role for configuring a realm, with clients and users, in an installed service.

Example configuration command

Execute the following command from the source root directory

ansible-playbook -i ansible_hosts -e @rhn-creds.yml playbooks/keycloak.yml -e keycloak_admin_password=<changeme> -e keycloak_realm=test`

License

Apache License v2.0 or later

See LICENCE to view the full text.