wildfly driver role
This role provides a playbook to easily install a JDBC driver within the server modules directory tree. It comes with a template for the main.xml (that can be overriden).
Role Defaults
Variable |
Description |
Default |
---|---|---|
|
Path for module installation |
`{{ wildfly_home }}/modules/{{ wildfly_driver_module_name |
|
Path for jdbc driver installation |
|
|
Wildfly version to install |
|
|
Wildfly installation directory |
|
|
posix user account for wildfly |
|
|
posix group for wildfly |
|
Role Variables
Variable |
Description |
Required |
---|---|---|
|
Version of jdbc driver to download |
|
|
Filename of jdbc driver to download |
|
|
URL for jdbc driver download |
|
|
Name for the jdbc driver module |
|
Example Playbook
tasks:
- name: Install drivers with wildfly_driver role
ansible.builtin.include_role:
name: wildfly_driver
vars:
wildfly_driver_module_name: "{{ item.name }}"
wildfly_driver_version: "{{ item.version }}"
wildfly_driver_jar_filename: "{{ item.jar_file }}"
wildfly_driver_jar_url: "{{ item.url }}"
loop:
- version: "{{ postgres_driver_version }}"
name: 'org.postgresql'
jar_file: "postgresql-{{ postgres_driver_version }}.jar"
url: "https://repo.maven.apache.org/maven2/org/postgresql/postgresql/{{ postgres_driver_version }}/postgresql-{{ postgres_driver_version }}.jar"
- version: "{{ mariadb_driver_version }}"
name: 'org.mariadb'
jar_file: "mariadb-java-client-{{ mariadb_driver_version }}.jar"
url: "https://repo1.maven.org/maven2/org/mariadb/jdbc/mariadb-java-client/{{ mariadb_driver_version }}/mariadb-java-client-{{ mariadb_driver_version }}.jar"