24 lines
514 B
YAML
24 lines
514 B
YAML
#!/usr/bin/ansible-playbook
|
|
# vim:ft=ansible:
|
|
---
|
|
- name: Set up PostgreSQL
|
|
block:
|
|
- name: Install PostgreSQL
|
|
apt:
|
|
name:
|
|
- libpq-dev
|
|
- postgresql
|
|
- postgresql-contrib
|
|
- python3-psycopg2
|
|
- name: Start PostgreSQL
|
|
systemd:
|
|
name: postgresql
|
|
enabled: yes
|
|
state: started
|
|
- name: Template out backup module
|
|
template:
|
|
src: backup.sh
|
|
dest: /opt/backup/modules/psql.sh
|
|
mode: "0600"
|
|
become: yes
|