ansible-role-tomcat/tasks/pgsql_jdbc.yml

17 lines
494 B
YAML

---
# Postgresql JDBC
- name: Install the jdbc package if needed
apt: pkg=libpostgresql-jdbc-java state=present
when: tomcat_install_pg_jdbc
tags: [ 'tomcat', 'tomcat_jdbc' ]
- name: Configure tomcat to use the global postgresql jdbc driver
file: src=/usr/share/java/{{ item }} dest=/usr/share/tomcat{{ tomcat_version }}/lib/{{ item }} state=link
with_items:
- postgresql-jdbc4.jar
when: tomcat_install_pg_jdbc
notify:
tomcat restart
tags: [ 'tomcat', 'tomcat_jdbc' ]