Skip to content

Commit

Permalink
New variable for binding of management ports
Browse files Browse the repository at this point in the history
  • Loading branch information
guidograzioli committed Sep 28, 2022
1 parent dfc1912 commit a7fbce2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ warn_list:
- jinja[spacing]
- jinja[invalid]
- meta-no-tags
- name[template]

skip_list:
- vars_should_not_be_used
Expand Down
1 change: 1 addition & 0 deletions roles/keycloak/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Role Defaults
|`keycloak_db_enabled`| Enable auto configuration for database backend | `True` if `keycloak_ha_enabled` is True, else `False` |
|`keycloak_admin_user`| Administration console user account | `admin` |
|`keycloak_bind_address`| Address for binding service ports | `0.0.0.0` |
|`keycloak_management_port_bind_address`| Address for binding management ports | `127.0.0.1` |
|`keycloak_host`| hostname | `localhost` |
|`keycloak_http_port`| HTTP port | `8080` |
|`keycloak_https_port`| TLS HTTP port | `8443` |
Expand Down
1 change: 1 addition & 0 deletions roles/keycloak/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ keycloak_http_port: 8080
keycloak_https_port: 8443
keycloak_ajp_port: 8009
keycloak_jgroups_port: 7600
keycloak_management_port_bind_address: 127.0.0.1
keycloak_management_http_port: 9990
keycloak_management_https_port: 9993
keycloak_java_opts: "-Xms1024m -Xmx2048m"
Expand Down
4 changes: 4 additions & 0 deletions roles/keycloak/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ argument_specs:
default: "0.0.0.0"
description: "Address for binding service ports"
type: "str"
keycloak_management_port_bind_address:
default: "127.0.0.1"
description: "Address for binding the managemnt ports"
type: "str"
keycloak_host:
# line 35 of keycloak/defaults/main.yml
default: "localhost"
Expand Down
4 changes: 2 additions & 2 deletions roles/keycloak/templates/standalone-infinispan.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@
</profile>
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
<inet-address value="{{ keycloak_management_port_bind_address }}"/>
</interface>
<interface name="jgroups">
{% if ansible_default_ipv4 is defined %}
Expand All @@ -734,7 +734,7 @@
{% endif %}
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
<inet-address value="{{ keycloak_bind_address }}"/>
</interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
Expand Down
4 changes: 2 additions & 2 deletions roles/keycloak/templates/standalone.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -632,10 +632,10 @@
</profile>
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
<inet-address value="{{ keycloak_management_port_bind_address }}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
<inet-address value="{{ keycloak_bind_address }}"/>
</interface>
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
Expand Down

0 comments on commit a7fbce2

Please sign in to comment.