2020-07-28 08:38:21 -05:00
|
|
|
#!/usr/bin/ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
|
|
|
---
|
|
|
|
- name: Set up PostgreSQL
|
|
|
|
block:
|
|
|
|
- name: Install PostgreSQL
|
|
|
|
apt:
|
|
|
|
name:
|
|
|
|
- libpq-dev
|
2020-07-28 08:46:45 -05:00
|
|
|
- postgresql
|
|
|
|
- postgresql-contrib
|
2020-07-28 08:38:21 -05:00
|
|
|
- python3-psycopg2
|
|
|
|
- name: Start PostgreSQL
|
|
|
|
systemd:
|
|
|
|
name: postgresql
|
|
|
|
enabled: yes
|
|
|
|
state: started
|
2020-08-01 16:44:04 -05:00
|
|
|
- name: Template out backup module
|
|
|
|
template:
|
|
|
|
src: backup.sh
|
|
|
|
dest: /opt/backup/modules/pgsql.sh
|
|
|
|
mode: "0600"
|
2020-07-28 08:38:21 -05:00
|
|
|
become: yes
|