From 11fb2cc43bc32c39ad5402247ea9ba5f82bfd4f5 Mon Sep 17 00:00:00 2001 From: Guido Grazioli Date: Thu, 27 Jan 2022 11:59:35 +0100 Subject: [PATCH] rework docs, add python requirements --- README.md | 27 ++++++++++++++++++--------- requirements.txt | 6 ++++++ roles/keycloak/README.md | 4 ++-- 3 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 requirements.txt diff --git a/README.md b/README.md index 93e41eb..616fe87 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,23 @@ collections: - name: middleware_automation.keycloak ``` +The keycloak collection also depends on the following python packages to be present on the controller host: + +* netaddr + +A requirement file is provided to install: + + pip install -r requirements.txt + + +### Included roles + +* [`keycloak`](https://github.com/ansible-middleware/keycloak/blob/main/roles/keycloak/README.md): role for installing the service. +* [`keycloak_realm`](https://github.com/ansible-middleware/keycloak/blob/main/roles/keycloak_realm/README.md): role for configuring a realm, user federation(s), clients and users, in an installed service. + + +## Usage + ### Install Playbook `playbooks/keycloak.yml` installs the upstream(Keycloak) based on the defined variables. @@ -80,10 +97,6 @@ keycloak_rhsso_enable: True zip_file_local_path: ``` -### Install role - -* [`keycloak`](https://github.com/ansible-middleware/keycloak/blob/main/roles/keycloak/README.md): role for installing the service. _Requires: python3-netaddr_ - ### Example installation command Execute the following command from the source root directory @@ -106,10 +119,6 @@ ansible-playbook -i -e @rhn-creds.yml playbooks/keycloak.yml -e `playbooks/keycloak-realm.yml` creates provided realm, user federation(s), client(s), client role(s) and client user(s) if they don't exist. -### Config role - -* [`keycloak_realm`](https://github.com/ansible-middleware/keycloak/blob/main/roles/keycloak_realm/README.md): role for configuring a realm, user federation(s), clients and users, in an installed service. - ### Example configuration command Execute the following command from the source root directory @@ -131,5 +140,5 @@ ansible-playbook -i playbooks/keycloak-realm.yml -e keycloak_adm Apache License v2.0 or later -See [LICENCE](LICENSE) to view the full text. +See [LICENSE](LICENSE) to view the full text. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..b2366a5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +################################################# +# python dependencies required to be installed +# on the controller host with: +# pip install -r requirements.txt +# +netaddr \ No newline at end of file diff --git a/roles/keycloak/README.md b/roles/keycloak/README.md index 93a1a8f..6143446 100644 --- a/roles/keycloak/README.md +++ b/roles/keycloak/README.md @@ -91,8 +91,8 @@ Dependencies The roles depends on: -* the redhat_csp_download role from [middleware_automation.redhat_csp_download](https://github.com/ansible-middleware/redhat-csp-download) collection if Red Hat Single Sign-on zip have to be downloaded from RHN. -* the wildfly_driver role from [middleware_automation.wildfly](https://github.com/ansible-middleware/wildfly) collection +* the `redhat_csp_download` role from [middleware_automation.redhat_csp_download](https://github.com/ansible-middleware/redhat-csp-download) collection if Red Hat Single Sign-on zip have to be downloaded from RHN. +* the `wildfly_driver` role from [middleware_automation.wildfly](https://github.com/ansible-middleware/wildfly) collection Example Playbook