#!/bin/sh

# {{ ansible_managed }}

VERSION="{{ item.version | d(postgresql_server__version) }}"
NAME="{{ item.name }}"

if [ -r "/etc/postgresql/${VERSION}/${NAME}/postgresql.conf" ] \
   && [ -x "/usr/sbin/autopostgresqlbackup-${VERSION}-${NAME}" ]; then
        "/usr/sbin/autopostgresqlbackup-${VERSION}-${NAME}"
fi
