diff --git a/playbooks/infinispan.yml b/playbooks/infinispan.yml index 8021eff..ffc6ca3 100644 --- a/playbooks/infinispan.yml +++ b/playbooks/infinispan.yml @@ -15,5 +15,4 @@ name: infinispan vars: supervisor_password: "itsme" - create_keycloak_caches: False infinispan_users: [] diff --git a/roles/infinispan/README.md b/roles/infinispan/README.md index e69de29..bd25b89 100644 --- a/roles/infinispan/README.md +++ b/roles/infinispan/README.md @@ -0,0 +1,72 @@ +infinispan +========== + +Install [Infinispan](https://infinispan.org/) or [Red Hat DataGrid](https://www.redhat.com/en/technologies/jboss-middleware/data-grid) server configurations. + + +Role Defaults +------------- + +| Variable | Description | Default | +|:---------|:------------|:---------| +|`infinispan_keycloak_caches`| Creates remote caches for keycloak | `False` | +|`override_jdg_port`| Alternate port for the service | `11222` | +|`override_jdg_jgroups_port`| Alternate port for the jgroups cluster | `7800` | +|`override_jdg_bind_addr`| Alternate bind address for the daemon | `localhost` | + + +Role Variables +-------------- + +The following are a set of required variables for the role: + +| Variable | Description | +|:---------|:------------| +|`supervisor_password`| Password for the administration console user account | +|`infinispan_users`| List of _user definitions_ to create | + +Sample _user definition_ format: + +```yaml +infinispan_users: + - { name: 'testuser1', password: 'test', roles: 'observer' } + - { name: 'testuser2', password: 'test', roles: 'application' } +``` + + +Dependencies +------------ + +The roles depends on the redhat_csp_download roles of [middleware_automation.redhat_csp_download](https://github.com/ansible-middleware/redhat-csp-download) collection. + + +Example Playbook +---------------- + +The following is an example playbook that makes use of the role to install Infinispan + +```yaml +--- +- hosts: ... + collections: + - middleware_automation.infinispan + tasks: + - name: Include Infinispan role + include_role: + name: infinispan + vars: + supervisor_password: "changeme" + infinispan_users: [] +``` + +License +------- + +Apache License 2.0 + +Author Information +------------------ + +* [Guido Grazioli](https://github.com/guidograzioli) +* [Romain Pelisse](https://github.com/rpelisse) +* [Matthew Fernandez](https://github.com/l3acon) \ No newline at end of file diff --git a/roles/infinispan/defaults/main.yml b/roles/infinispan/defaults/main.yml index be00786..092c48f 100644 --- a/roles/infinispan/defaults/main.yml +++ b/roles/infinispan/defaults/main.yml @@ -19,7 +19,7 @@ jdg: home: "{{jdg_default_installation_path if jdg_rhn_id is defined else infinispan_installation_path }}" bind_addr: "{{ override_jdg_bind_addr | default('localhost') }}" port: "{{ override_jdg_port | default('11222') }}" - jgroups_port: "7800" + jgroups_port: "{{ override_jdg_jgroups_port | default('7800') }}" config: name: "{{ override_jdg_config | default('jdg.xml') }}" template: "{{ override_jdg_config_template | default('templates/infinispan.xml.j2') }}" @@ -40,8 +40,9 @@ jdg_supervisor: jdg_default_realm_tls: False +infinispan_keycloak_caches: False jdg_keycloak_cache: - enabled: "{{ create_keycloak_caches }}" + enabled: "{{ infinispan_keycloak_caches }}" caches: - sessions - offlineSessions diff --git a/roles/infinispan/vars/main.yml b/roles/infinispan/vars/main.yml index e1cb8b0..0213e56 100644 --- a/roles/infinispan/vars/main.yml +++ b/roles/infinispan/vars/main.yml @@ -1,4 +1,3 @@ --- supervisor_password: -create_keycloak_caches: infinispan_users: [] \ No newline at end of file