middleware_automation.jcliff.jcliff module – Manages the configuration of Wildfly / JBoss EAP servers

Note

This module is part of the middleware_automation.jcliff collection (version 0.0.23).

To install it, use: ansible-galaxy collection install middleware_automation.jcliff.

To use it in a playbook, specify: middleware_automation.jcliff.jcliff.

Synopsis

  • Wraps the JCliff Java utility tool in order to support fine grained tuning of Wildfly / JBoss EAP server configuration in Ansible.

Note

This module has a corresponding action plugin.

Parameters

Parameter

Comments

components

aliases: subsystems

list / elements=dictionary

Wildfly or JBoss EAP Subsystems or configuration component

datasources

list / elements=dictionary

Datasource configurations.

check_valid_connection_sql

string

Datasource SQL query for checking a valid connection.

Default: “undefined”

connection_url

string / required

Connection URL.

driver_name

string / required

Name of the driver.

enabled

string

Whether the datasource is enabled.

Default: “true”

idle_timeout_minutes

string

Datasource idle timeout minutes.

Default: “undefined”

jndi_name

string / required

JNDI name.

max_pool_size

string

Datasource maximum pool size.

Default: “undefined”

min_pool_size

string

Datasource minimum pool size.

Default: “undefined”

name

string / required

Datasource name.

password

string

Datasource password.

pool_name

string

Name of the datasource pool.

query_timeout

string

Datasource query timeout.

Default: “undefined”

use_java_context

string

Use the Java context.

Default: “true”

user_name

string

Datasource user name.

validate_on_match

string

Datasource validate on match.

Default: “undefined”

deployments

list / elements=dictionary

Deployments.

disabled

boolean

Adds to the repository in a disabled state.

Choices:

  • false

  • true

name

string / required

Name of the deployment.

path

string / required

Path to the deployment.

replace_name_regex

string

Regex pattern to replace the deployment if the value matches the name.

replace_runtime_name_regex

string

Regex pattern to replace the deployment if the value matches the runtime name.

runtime_name

string

Runtime of the deployment.

unmanaged

boolean

Specifies whether the deployment should be managed.

Choices:

  • false

  • true

drivers

list / elements=dictionary

JDBC driver configurations.

driver_class_name

string

Driver class name.

Default: “undefined”

driver_datasource_class_name

string

Class name for the datasource.

Default: “undefined”

driver_module_name

string / required

Name of the driver module.

driver_name

string / required

Name of the driver.

driver_xa_datasource_class_name

string

Class name for the XA datasource.

Default: “undefined”

module_slot

string

Name of the module slot.

Default: “undefined”

interfaces

list / elements=dictionary

Interface.

any_address

boolean

Sockets using this interface should be bound to a wildcard address

Choices:

  • false

  • true

inet_address

string

Whether or not the address matches the given value

boolean

Part of the selection criteria for choosing an IP address for this interface should be whether or not the address is link-local

Choices:

  • false

  • true

loopback

boolean

Part of the selection criteria for choosing an IP address for this interface should be whether or not it is a loopback address

Choices:

  • false

  • true

loopback_address

string

Value indicating that the IP address for this interface should be the given value, if a loopback interface exists on the machine

multicast

boolean

Whether or not its network interface supports multicast

Choices:

  • false

  • true

name

string / required

Name of the interface

nic

string

Part of the selection criteria for choosing an IP address for this interface should be whether its network interface has the given name

nic_match

string

Whether its network interface has a name that matches the given regular expression

point_to_point

boolean

Whether or not its network interface is a point-to-point interface

Choices:

  • false

  • true

public_address

boolean

Whether or not it is a publicly routable address

Choices:

  • false

  • true

resolved_address

string

The resolved ip address for this interface

site_local_address

boolean

Whether or it is a site-local address

Choices:

  • false

  • true

subnet_match

string

Whether or it the address fits in the given subnet definition. Value is a network IP address and the number of bits in the address

up

boolean

Whether its network interface is currently up

Choices:

  • false

  • true

virtual

boolean

Whether its network interface is a virtual interface

Choices:

  • false

  • true

keycloak

list / elements=dictionary

Keycloak.

secure_deployment

list / elements=dictionary

List of applications to secure using Keycloak.

auth_server_url

string / required

Base URL of the Keycloak server.

credential

string

The secure value for the application. If not provided, it is setup as a public client.

deployment_name

string / required

Name of the deployment.

disable_trust_manager

boolean

Should only be used during development and NEVER in production as it will disable verification of SSL certificates. Default false.

Choices:

  • false

  • true

realm

string

Name of the Keycloak realm.

resource

string / required

The client-id of the application.

ssl_required

string

Ensures that communication to and from the Keycloak server is over HTTPS. Default external. Possible values all external none.

use_resource_role_mappings

boolean

Whether the adapter will look inside the token for application level role mappings for the user. The default value is false.

Choices:

  • false

  • true

verify_token_audience

boolean

Whether the adapter will verify whether the token contains this client name (resource) as an audience. Default is false.

Choices:

  • false

  • true

logging

list / elements=dictionary

logger.

level

string

Replace level with log level that is to be set

name

string / required

Replace name with name of the log category

mail

list / elements=dictionary

mail.

from_email

string / required

Replace from_email with email id.

jndi_name

string / required

Set jndi_name, for ex. java:jboss/mail/testSession

name

string / required

Replace name with subject.

outbound_socket_binding_ref

string / required

Set outbound_socket_binding_ref, for ex. mail-smtp

ssl

boolean

Set ssl

Choices:

  • false

  • true

messaging_activemq

dictionary

Create messaging activemq.

address_setting

list / elements=dictionary

Configure address setting

dead_letter_address

string

Sets the dead-letter-address.

expiry_address

string

Sets the expiry-address.

max_delivery_attempts

integer

Sets max number of delivery attempts.

name

string / required

Enter the details of address setting.

redelivery_delay

integer

Sets the redelivery-delay.

bridge

list / elements=dictionary

Configure bridge

discovery_group

string / required

discovery group

name

string / required

Logical name of the bridge

queue_name

string / required

queue name

static_connectors

string / required

static connectors

connection_factory

list / elements=dictionary

Configure connection factory.

connectors

list / elements=string

Legacy entries

discovery_group

string

discovery group

entries

list / elements=string / required

Enter the required entries

name

string / required

Logical name of the connection factory

connector

list / elements=dictionary

Configure connector.

factory_class

string / required

factory class

name

string / required

Logical name of the connector.

in_vm_acceptor

list / elements=dictionary

Configure in vm acceptor

name

string / required

Enter the details of in vm acceptor.

server_id

string / required

Enter the details of server id.

jms_queue

list / elements=dictionary

Create JMS queue

durable

string

Enter if it is durable or not.

entries

list / elements=string / required

Enter the required entries.

headers

string

headers

legacy_entries

string

Legacy entries

name

string / required

Logical name of the jms queue

selector

string

seclecor

jms_topic

list / elements=dictionary

Configure jms topic.

entries

list / elements=string / required

Enter the required entries.

headers

string

headers

legacy_entries

string

Legacy entries

name

string / required

Logical name of the jms topic.

pooled_connection_factory

list / elements=dictionary

Configure pooled connection factory

connector

string / required

Enter the details of connector.

discovery

string

Enter the details of discovery.

entries

list / elements=string / required

Enter entries.

name

string / required

Enter the details of pooled connection factory.

remote_acceptor

list / elements=dictionary

Configure remote acceptor

name

string / required

Enter the details of remote acceptor.

remote_connector

list / elements=dictionary

Configure remote connector

name

string / required

Enter the details of remote acceptor.

socket_binding

string / required

Enter the details of socket binding.

security_setting

list / elements=dictionary

Configure security setting

consume

string

Consume

create_durable_queue

string

create_durable_queue

create_non_durable_queue

string

create_non_durable_queue

delete_durable_queue

string

delete_durable_queue

delete_non_durable_queue

string

delete_non_durable_queue

manage

string

manage

name

string / required

Logical name of the bridge

send

string / required

enter details to send

server_property

list / elements=dictionary

Creates and sets messaging-activemq server properties.

name

string / required

Name of property.

value

string / required

Value of property.

modcluster

dictionary

Manage Modcluster.

proxy

list / elements=dictionary

Modcluster proxy.

advertise

boolean

Whether to enable multicast-based advertise mechanism.

Choices:

  • false

  • true

advertise_security_key

string

If specified, reverse proxy advertisements checksums will be verified using this value as a salt.

advertise_socket

string

Name of socket binding to use for the advertise socket.

auto_enable_contexts

boolean

If false, the contexts are registered with the reverse proxy as disabled.

Choices:

  • false

  • true

balancer

string

The name of the balancer on the reverse proxy to register with.

excluded_contexts

string

List of contexts to exclude from registration with the reverse proxies.

flush_packets

boolean

Whether to enable packet flushing on the reverse proxy.

Choices:

  • false

  • true

flush_wait

integer

Time to wait before flushing packets on the reverse proxy.

listener

string

The name of Undertow listener that will be registered with the reverse proxy.

load_balancing_group

string

Name of the load balancing group this node belongs to.

max_attempts

integer

Maximum number of failover attempts by reverse proxy when sending the request to the backend server.

name

string / required

Logical name of the modcluster proxy.

node_timeout

integer

Timeout (in seconds) for proxy connections to a node. Time mod_cluster will wait for the back-end response before returning an error.

ping

integer

Number of seconds for which to wait for a pong answer to a ping.

proxies

list / elements=string

List of reverse proxies for mod_cluster to register with defined by ‘outbound-socket-binding’ in ‘socket-binding-group’.

proxy_list

string

List of reverse proxies to register with. Format (hostname:port) separated with commas.

proxy_url

string

Base URL for MCMP requests.

session_draining_strategy

string

Session draining strategy used during undeployment of a web application.

simple_load_provider

integer

Simple load provider returns constant pre-configured load balancing factor.

smax

integer

Soft maximum idle connection count for reverse proxy.

socket_timeout

integer

Timeout to wait for the reverse proxy to answer a MCMP message.

ssl_context

string

Reference to the SSLContext to be used by mod_cluster.

status_interval

integer

Number of seconds a STATUS message is sent from the application server to the proxy.

sticky_session

boolean

Indicates whether subsequent requests for a given session should be routed to the same node, if possible.

Choices:

  • false

  • true

sticky_session_force

boolean

Whether the reverse proxy should run an error in the event that the balancer is unable to route a request to the node to which it is stuck.

Choices:

  • false

  • true

sticky_session_remove

boolean

Whether the reverse proxy should remove session stickiness when the balancer is unable to route a request to the node to which it is stuck.

Choices:

  • false

  • true

stop_context_timeout

integer

Maximum time to wait for context to process pending requests.

ttl

integer

Time to live (in seconds) for idle connections above smax.

worker_timeout

integer

Number of seconds to wait for a worker to become available to handle a request.

scanner

list / elements=dictionary

The deployment scanner is only used in standalone mode.

It can be found in standalone.xml.

name

string

The name of the scanner.

It can be path, relative-to, scan-enabled, scan-interval, auto-deploy-zipped, auto-deploy-exploded, auto-deploy-xml, deployment-timeout

value

string

standard_sockets

dictionary

Create Socket bindings.

remote_destination_outbound_socket_binding

list / elements=dictionary

Remote destination outbound socket binding.

fixed_source_port

boolean

Whether the port value should remain fixed even if numeric offsets are applied to the other outbound sockets in the socket group.

Choices:

  • false

  • true

host

string / required

The host name or the IP address of the remote destination to which this outbound socket will connect.

name

string / required

Logical name of the remote destination outbound socket configuration that should be used elsewhere in the configuration.

port

integer / required

The port number of the remote destination to which the outbound socket should connect.

source_interface

string

The name of the interface which will be used for the source address of the outbound socket.

source_port

integer

The port number which will be used as the source port of the outbound socket.

socket_binding

list / elements=dictionary

Socket bindings.

interface

string

Logical name of the interface to which a socket based on this configuration should be bound.

multicast_address

string

If the socket will be used for multicast, the multicast address to use.

multicast_port

string

If the socket will be used for multicast, the multicast port to use.

name

string / required

Logical name of the socket configuration that should be used elsewhere in the configuration.

port

string / required

Base port to which a socket based on this configuration should be bound.

system_properties

list / elements=dictionary

System properties.

name

string

System property name.

value

string

System property value.

transactions

list / elements=dictionary

Setting node-identifier

name

string / required

Node-identifier

value

string / required

enter the respective value, corresponding to name.

undertow

list / elements=dictionary

Undertow configuration

configuration

list / elements=dictionary

Configuration

filter

string

The type of filter to use

server

list / elements=dictionary

List of servers to setup using Undertow

host

list / elements=dictionary

List of hosts for this server

filter_ref

list / elements=dictionary

Reference to the filtertype

gzipfilter

list / elements=dictionary

Gzip filter

predicate

string / required

Predicate describing relevant requests for filtering

name

string / required

Server name.

name

string / required

Server name.

xadatasources

list / elements=dictionary

XA Datasource configurations.

background_validation

boolean

Specifies that connections are validated on a background thread,

rather than being validated prior to use.

Mutually exclusive to validate-on-match.

Choices:

  • false

  • true

background_validation_millis

integer

The background-validation-millis element specifies the amount of

time, in milliseconds, that background validation will run.

Changing this value require a server restart.

check_valid_connection_sql

string

Datasource SQL query for checking a valid connection.

Default: “undefined”

driver_name

string / required

Name of the driver.

enabled

string

Whether the datasource is enabled.

Default: “true”

exception_sorter_class_name

string

Which exception sorter class should be used.

Default: “undefined”

jndi_name

string / required

JNDI name.

max_pool_size

integer

The max-pool-size element specifies the maximum number of

connections for a pool. No more connections will be created

in each sub-pool

min_pool_size

integer

The min-pool-size element specifies the minimum number of

connections for a pool.

name

string / required

Datasource name.

no_recovery

boolean

Should datasource attempt recovery.

Choices:

  • false

  • true

password

string

Datasource password.

pool_name

string

Name of the datasource pool.

same_rm_override

boolean

The same-rm-override element allows one to unconditionally set

whether the javax.transaction.xa.XAResource.isSameRM(XAResource)

returns true or false.

Choices:

  • false

  • true

use_java_context

string

Use the Java context.

Default: “true”

user_name

string

Datasource user name.

valid_connection_checker_class_name

string

An org.jboss.jca.adapters.jdbc.ValidConnectionChecker that

provides a SQLException isValidConnection(Connection e) method

to validate is a connection is valid.

Default: “undefined”

validate_on_match

string

The validate-on-match element indicates whether or not

connection level validation should be done when a connection

factory attempts to match a managed connection for a given set.

Default: “undefined”

xa_datasource_class

string

The fully qualified name of the javax.sql.XADataSource implementation

xa_datasource_properties

dictionary / required

Properties for XA datasource

url

string / required

url for this datasource

debug_mode

boolean

Debug output.

Choices:

  • false ← (default)

  • true

jcliff

string

Path to the the Jcliff utility.

Default: “/usr/bin/jcliff”

jcliff_home

string

Home directory for the Jcliff utility.

Default: “/usr/share/jcliff”

jcliff_jvm

string

Location of the Java JVM.

management_host

string

Management host.

Default: “localhost”

management_password

string

Management password.

management_port

string

Management port.

Default: “9990”

management_username

string

Management username.

reconnect_delay

integer

Set jcliff reconnect delay

Default: 30000

remote_rulesdir

string

Location of the rules directory on the remote instance.

rule_file

string

Name of the rules file.

rules_dir

string

Directory containing Jcliff rules.

Default: “/usr/share/jcliff/rules”

state

string

If ‘present’, configurations will be applied to the Wildfly/JBoss EAP server.

If ‘absent’, configurations will be removed from the Wildfly/JBoss EAP server - this is NOT implemented yet!

Choices:

  • present ← (default)

  • absent

timeout

integer

Set jcliff timeout (how long a jcliff will allow a query to the server to last)

Default: 30000

wfly_home

aliases: jboss_home

string / required

Home directory for the Wildfly or JBoss EAP server.

Examples

- name: Configure Wildfly instance
  jcliff:
    wfly_home: "/opt/wildfly"
    subsystems:
      - system_properties:
          - name: jcliff.enabled
            value: 'enabled.plus'
      - datasources:
          - name: ExampleDS2
            use_java_context: 'true'
            jndi_name: java:jboss/datasources/ExampleDS2
            connection_url: "jdbc:h2:mem:test2;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE"
            driver_name: h2

Authors

  • Andrew Block (@sabre1041), Romain Pelisse (@rpelisse), Harsha Cherukuri (@hcheruku)