community.general.jboss module – Deploy applications to JBoss

Note

This module is part of the community.general collection (version 9.5.1).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.jboss.

Synopsis

  • Deploy applications to JBoss standalone using the filesystem.

Parameters

Parameter

Comments

deploy_path

path

The location in the filesystem where the deployment scanner listens.

Default: "/var/lib/jbossas/standalone/deployments"

deployment

string / required

The name of the deployment.

src

path

The remote path of the application ear or war to deploy.

Required when state=present.

Ignored when state=absent.

state

string

Whether the application should be deployed or undeployed.

Choices:

  • "present" ← (default)

  • "absent"

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: none

Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode.

Notes

Note

  • The JBoss standalone deployment-scanner has to be enabled in standalone.xml

  • The module can wait until deployment file is deployed/undeployed by deployment-scanner. Duration of waiting time depends on scan-interval parameter from standalone.xml.

  • Ensure no identically named application is deployed through the JBoss CLI

See Also

See also

WildFly reference

Complete reference of the WildFly documentation.

Examples

- name: Deploy a hello world application to the default deploy_path
  community.general.jboss:
    src: /tmp/hello-1.0-SNAPSHOT.war
    deployment: hello.war
    state: present

- name: Update the hello world application to the non-default deploy_path
  community.general.jboss:
    src: /tmp/hello-1.1-SNAPSHOT.war
    deploy_path: /opt/wildfly/deployment
    deployment: hello.war
    state: present

- name: Undeploy the hello world application from the default deploy_path
  community.general.jboss:
    deployment: hello.war
    state: absent

Authors

  • Jeroen Hoekx (@jhoekx)