quartz-scheduler creates the datasource in wildfly

parent 39ff70fe
connect
if (outcome == failed) of /subsystem=datasources/data-source=quartz-ds:read-resource
\
/subsystem=datasources/data-source=quartz-ds:add( \
jndi-name=java:jboss/datasources/quartz-ds, \
jta=true, \
enabled=true, \
use-ccm=false, \
\
driver-name=postgresql92-jdbc.jar, \
driver-class=org.postgresql.Driver, \
\
connection-url=jdbc:postgresql://localhost:5432/DB_NAME, \
user-name=DB_USER, \
password=DB_PASS, \
\
share-prepared-statements=false, \
validate-on-match=false, \
background-validation=false \
)
end-if
...@@ -34,3 +34,23 @@ ...@@ -34,3 +34,23 @@
command: "psql -U vagrant -w -f {{ item }} -d {{ db_name }}" command: "psql -U vagrant -w -f {{ item }} -d {{ db_name }}"
with_items: with_items:
- ~/quartz_tables_postgres.sql - ~/quartz_tables_postgres.sql
- name: Copy Quartz Datasource CLI
copy: src=../files/quartz-ds.cli
dest=~
mode=0775
- name: Update database name in Quartz Datasource CLI
replace:
path: ~/quartz-ds.cli
regexp: "{{ item.regexp }}"
replace: "{{ item.replace }}"
with_items:
- { regexp: 'DB_NAME', replace: "{{ db_name }}" }
- { regexp: 'DB_USER', replace: "{{ db_user }}" }
- { regexp: 'DB_PASS', replace: "{{ db_user_pw }}" }
- name: Install Quartz Datasource
shell: chdir=~ {{ ansible_local.build_vars.wildfly.wildfly_prog_directory }}/jboss-cli.sh --file="{{ item }}"
with_items:
- quartz-ds.cli
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment