wildfly app deploy role
Role to deploy applications (.war, .ear, .jar) to WildFly application server in standalone mode.
Requirements
WildFly server must be installed and running
Management interface must be accessible
The
wildfly_utilsrole is required as a dependency
Role Defaults
Variable |
Description |
Default |
|---|---|---|
|
Path to the application artifact (.war, .ear, .jar) on the Ansible controller |
|
|
The name to use for the deployment in WildFly (e.g., app-v1.war) |
|
|
WildFly installation directory (inherits from wildfly_install role) |
Inherited |
|
WildFly installation directory, for backwards compatibility (inherits from wildfly_utils role) |
Inherited |
|
Hostname for connecting to CLI |
|
|
Port for connecting to CLI |
|
|
Increment for |
|
|
POSIX user account for WildFly |
|
|
POSIX group for WildFly |
|
Role Variables
Variable |
Description |
Required |
|---|---|---|
|
Path to the application artifact on the Ansible controller |
|
Example Playbooks
Deploy Application to Standalone Server
Deploy a WAR file to a standalone WildFly instance.
- name: Deploy application to WildFly
hosts: wildfly_servers
gather_facts: false
roles:
- role: middleware_automation.wildfly.wildfly_app_deploy
vars:
wildfly_app_deployment_file: "/path/to/myapp.war"
wildfly_app_deploy_name: "myapp.war"
wildfly_home: "/opt/wildfly/wildfly-39.0.0.Final/"
jboss_cli_controller_host: "localhost"
jboss_cli_controller_port: "9990"
Deploy with Port Offset
Deploy to a WildFly instance using a port offset.
- name: Deploy application with port offset
hosts: wildfly_servers
gather_facts: false
roles:
- role: middleware_automation.wildfly.wildfly_app_deploy
vars:
wildfly_app_deployment_file: "/path/to/myapp.war"
wildfly_app_deploy_name: "myapp.war"
wildfly_port_range_offset: 100
jboss_cli_controller_port: "9990" # Port will be 9990 + 100 = 10090. See https://docs.wildfly.org/39/ for port offset documentation
Dependencies
wildfly_utils- Required for CLI operations
License
Apache License 2.0