32 lines
803 B
YAML
32 lines
803 B
YAML
---
|
|
- name: Install autopostgresqlbackup
|
|
ansible.builtin.apt:
|
|
pkg: autopostgresqlbackup
|
|
update_cache: true
|
|
|
|
- name: Copy autopostgresqlbackup configuration
|
|
ansible.builtin.template:
|
|
src: autopostgresqlbackup.j2
|
|
dest: /etc/default/autopostgresqlbackup
|
|
mode: "0644"
|
|
|
|
- name: Copy autopostgresqlbackup postbackup script
|
|
ansible.builtin.template:
|
|
src: autopostgresqlbackup_post_script.j2
|
|
dest: "{{ autopostgresqlbackup_config.postbackup }}"
|
|
mode: "0755"
|
|
|
|
- name: Copy systemd override
|
|
ansible.builtin.copy:
|
|
src: systemd/override.conf
|
|
dest: /etc/systemd/system/postgresql@.service.d/
|
|
mode: "0644"
|
|
notify:
|
|
- Reload systemd
|
|
- Restart postgresql
|
|
|
|
- name: Enable Ansible support
|
|
ansible.builtin.apt:
|
|
name:
|
|
- python3-psycopg2
|
|
- sudo
|