2023-11-04 13:07:10 +01:00
|
|
|
---
|
|
|
|
- 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
|
2023-11-04 13:51:42 +01:00
|
|
|
|
|
|
|
- name: Enable Ansible support
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name:
|
|
|
|
- python3-psycopg2
|
|
|
|
- sudo
|