Skip to content

Commit

Permalink
Add role README
Browse files Browse the repository at this point in the history
  • Loading branch information
guidograzioli committed Dec 15, 2021
1 parent 1c0a3ff commit 3aae581
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 4 deletions.
1 change: 0 additions & 1 deletion playbooks/infinispan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@
name: infinispan
vars:
supervisor_password: "itsme"
create_keycloak_caches: False
infinispan_users: []
72 changes: 72 additions & 0 deletions roles/infinispan/README.md
Original file line number Diff line number Diff line change
@@ -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)
5 changes: 3 additions & 2 deletions roles/infinispan/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}"
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion roles/infinispan/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
supervisor_password:
create_keycloak_caches:
infinispan_users: []

0 comments on commit 3aae581

Please sign in to comment.