ansible-roles/tomcat/tasks/pgsql_jdbc.yml

19 lines
525 B
YAML
Raw Normal View History

---
# Postgresql JDBC
- name: Install the jdbc package if needed
apt: pkg={{ item }} state=present
with_items:
- libpostgresql-jdbc-java
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' ]