2019-10-21 01:02:36 +00:00
|
|
|
---
|
|
|
|
# This task installs pgbackrest on a host
|
|
|
|
|
|
|
|
- name: Copy pgbackrest binary to host
|
|
|
|
copy:
|
2020-08-18 12:40:19 +00:00
|
|
|
src: /builds/pgbackrest-release-2.28/src/pgbackrest
|
2019-10-21 01:02:36 +00:00
|
|
|
dest: /usr/bin/pgbackrest
|
2019-10-21 01:28:33 +00:00
|
|
|
mode: '0755'
|
2019-10-21 01:02:36 +00:00
|
|
|
|
|
|
|
- name: Make sure Perl is installed
|
|
|
|
apt:
|
|
|
|
name: perl
|
|
|
|
state: latest
|
|
|
|
|
|
|
|
- name: Make pgbackrest log directory with the correct permissions
|
|
|
|
file:
|
|
|
|
path: /var/log/pgbackrest
|
|
|
|
state: directory
|
|
|
|
owner: postgres
|
|
|
|
group: postgres
|
|
|
|
mode: '0770'
|
|
|
|
|
|
|
|
- name: Make pgbackrest config directory
|
|
|
|
file:
|
|
|
|
path: /etc/pgbackrest/conf.d
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
- name: Touch pgbackrest.conf
|
|
|
|
file:
|
|
|
|
path: /etc/pgbackrest/pgbackrest.conf
|
|
|
|
state: touch
|
|
|
|
owner: postgres
|
|
|
|
group: postgres
|
|
|
|
mode: '0640'
|
2019-10-21 01:53:09 +00:00
|
|
|
|
|
|
|
- name: Copy pgbackrest logrotate configuration
|
|
|
|
copy:
|
|
|
|
src: pgbackrest
|
|
|
|
dest: /etc/logrotate.d/pgbackrest
|