{"id":42748183,"url":"https://github.com/ansible-middleware/keycloak","last_synced_at":"2026-01-29T19:24:56.979Z","repository":{"id":39582753,"uuid":"438180727","full_name":"ansible-middleware/keycloak","owner":"ansible-middleware","description":"Collection to install and configure Keycloak or Red Hat Single Sign-On / Red Hat Build of Keycloak","archived":false,"fork":false,"pushed_at":"2026-01-12T18:05:40.000Z","size":11520,"stargazers_count":123,"open_issues_count":12,"forks_count":66,"subscribers_count":9,"default_branch":"main","last_synced_at":"2026-01-12T23:48:55.181Z","etag":null,"topics":["ansible","ansible-collection","hacktoberfest","keycloak","rhbk","sso"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ansible-middleware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-12-14T08:50:43.000Z","updated_at":"2026-01-12T18:04:33.000Z","dependencies_parsed_at":"2026-01-12T20:03:37.161Z","dependency_job_id":null,"html_url":"https://github.com/ansible-middleware/keycloak","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"purl":"pkg:github/ansible-middleware/keycloak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-middleware%2Fkeycloak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-middleware%2Fkeycloak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-middleware%2Fkeycloak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-middleware%2Fkeycloak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ansible-middleware","download_url":"https://codeload.github.com/ansible-middleware/keycloak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ansible-middleware%2Fkeycloak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28883087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T16:41:59.663Z","status":"ssl_error","status_checked_at":"2026-01-29T16:39:39.641Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-collection","hacktoberfest","keycloak","rhbk","sso"],"created_at":"2026-01-29T19:24:56.843Z","updated_at":"2026-01-29T19:24:56.960Z","avatar_url":"https://github.com/ansible-middleware.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Collection - middleware_automation.keycloak\n\n\u003c!--start build_status --\u003e\n[![Build Status](https://github.com/ansible-middleware/keycloak/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/ansible-middleware/keycloak/actions/workflows/ci.yml)\n\n\u003e **_NOTE:_ If you are Red Hat customer, install `redhat.rhbk` (for Red Hat Build of Keycloak) or `redhat.sso` (for Red Hat Single Sign-On) from [Automation Hub](https://console.redhat.com/ansible/ansible-dashboard) as the certified version of this collection.**\n\n\u003c!--end build_status --\u003e\n\u003c!--start description --\u003e\nCollection to install and configure [Keycloak](https://www.keycloak.org/) or [Red Hat Single Sign-On](https://access.redhat.com/products/red-hat-single-sign-on) / [Red Hat Build of Keycloak](https://access.redhat.com/products/red-hat-build-of-keycloak).\n\u003c!--end description --\u003e\n\u003c!--start requires_ansible--\u003e\n## Ansible version compatibility\n\nThis collection has been tested against following Ansible versions: **\u003e=2.16.0**.\n\nPlugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions.\n\u003c!--end requires_ansible--\u003e\n\n\n## Installation\n\n\u003c!--start galaxy_download --\u003e\n### Installing the Collection from Ansible Galaxy\n\nBefore using the collection, you need to install it with the Ansible Galaxy CLI:\n\n    ansible-galaxy collection install middleware_automation.keycloak\n\n\u003c!--end galaxy_download --\u003e\n\nYou can also include it in a `requirements.yml` file and install it via `ansible-galaxy collection install -r requirements.yml`, using the format:\n\n```yaml\n---\ncollections:\n  - name: middleware_automation.keycloak\n```\n\nThe keycloak collection also depends on the following python packages to be present on the controller host:\n\n* netaddr\n* lxml\n\nA requirement file is provided to install:\n\n    pip install -r requirements.txt\n\n\u003c!--start roles_paths --\u003e\n### Included roles\n\n* `keycloak_quarkus`: role for installing keycloak (\u003e= 19.0.0, quarkus based).\n* `keycloak_realm`: role for configuring a realm, user federation(s), clients and users, in an installed service.\n* `keycloak`: role for installing legacy keycloak (\u003c= 19.0, wildfly based).\n\n\u003c!--end roles_paths --\u003e\n\n## Usage\n\n\n### Install Playbook\n\u003c!--start rhbk_playbook --\u003e\n* [`playbooks/keycloak_quarkus.yml`](https://github.com/ansible-middleware/keycloak/blob/main/playbooks/keycloak_quarkus.yml) installs keycloak \u003e= 17 based on the defined variables (using most defaults).\n* [`playbooks/keycloak.yml`](https://github.com/ansible-middleware/keycloak/blob/main/playbooks/keycloak.yml) installs keycloak legacy based on the defined variables (using most defaults).\n\nBoth playbooks include the `keycloak` role, with different settings, as described in the following sections.\n\nFor full service configuration details, refer to the [keycloak role README](https://github.com/ansible-middleware/keycloak/blob/main/roles/keycloak/README.md).\n\u003c!--end rhbk_playbook --\u003e\n\n#### Install from controller node (offline)\n\nMaking the keycloak zip archive available to the playbook working directory, and setting `keycloak_offline_install` to `true`, allows to skip\nthe download tasks. The local path for the archive does match the downloaded archive path, so that it is also used as a cache when multiple hosts are provisioned in a cluster.\n\n```yaml\nkeycloak_offline_install: true\n```\n\n\n\u003c!--start rhn_credentials --\u003e\n\u003c!--end rhn_credentials --\u003e\n\n\n#### Install from alternate sources (like corporate Nexus, artifactory, proxy, etc)\n\nIt is possible to perform downloads from alternate sources, using the `keycloak_download_url` variable; make sure the final downloaded filename matches with the source filename (ie. keycloak-legacy-x.y.zip or rh-sso-x.y.z-server-dist.zip).\n\n\n### Example installation command\n\nExecute the following command from the source root directory\n\n```\nansible-playbook -i \u003cansible_hosts\u003e -e @rhn-creds.yml playbooks/keycloak.yml -e keycloak_admin_password=\u003cchangeme\u003e\n```\n\n- `keycloak_admin_password` Password for the administration console user account.\n- `ansible_hosts` is the inventory, below is an example inventory for deploying to localhost\n\n  ```\n  [keycloak]\n  localhost ansible_connection=local\n  ```\n\nNote: when deploying clustered configurations, all hosts belonging to the cluster must be present in `ansible_play_batch`; ie. they must be targeted by the same ansible-playbook execution.\n\n\n## Configuration\n\n\n### Config Playbook\n\u003c!--start rhbk_realm_playbook --\u003e\n[`playbooks/keycloak_realm.yml`](https://github.com/ansible-middleware/keycloak/blob/main/playbooks/keycloak_realm.yml) creates or updates provided realm, user federation(s), client(s), client role(s) and client user(s).\n\u003c!--end rhbk_realm_playbook --\u003e\n\n### Example configuration command\n\nExecute the following command from the source root directory:\n\n```bash\nansible-playbook -i \u003cansible_hosts\u003e playbooks/keycloak_realm.yml -e keycloak_admin_password=\u003cchangeme\u003e -e keycloak_realm=test\n```\n\n- `keycloak_admin_password` password for the administration console user account.\n- `keycloak_realm` name of the realm to be created/used.\n- `ansible_hosts` is the inventory, below is an example inventory for deploying to localhost\n\n  ```\n  [keycloak]\n  localhost ansible_connection=local\n  ```\n\u003c!--start rhbk_realm_readme --\u003e\nFor full configuration details, refer to the [keycloak_realm role README](https://github.com/ansible-middleware/keycloak/blob/main/roles/keycloak_realm/README.md).\n\u003c!--end rhbk_realm_readme --\u003e\n\n\u003c!--start support --\u003e\n\u003c!--end support --\u003e\n\n\n## License\n\nApache License v2.0 or later\n\u003c!--start license --\u003e\nSee [LICENSE](LICENSE) to view the full text.\n\u003c!--end license --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansible-middleware%2Fkeycloak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fansible-middleware%2Fkeycloak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fansible-middleware%2Fkeycloak/lists"}