Add pgbackrest-install role
This commit is contained in:
parent
ab33cd0200
commit
74f35940f3
34
ubuntu/roles/pgbackrest-install/tasks/main.yml
Normal file
34
ubuntu/roles/pgbackrest-install/tasks/main.yml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
# This task installs pgbackrest on a host
|
||||||
|
|
||||||
|
- name: Copy pgbackrest binary to host
|
||||||
|
copy:
|
||||||
|
src: /builds/pgbackrest-release-2.18/src/pgbackrest
|
||||||
|
dest: /usr/bin/pgbackrest
|
||||||
|
mode: '0744'
|
||||||
|
|
||||||
|
- 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'
|
@ -59,3 +59,10 @@
|
|||||||
|
|
||||||
roles:
|
roles:
|
||||||
- firewall-ruleset-deploy
|
- firewall-ruleset-deploy
|
||||||
|
|
||||||
|
- name: Install pgbackrest
|
||||||
|
host: pgbackrest
|
||||||
|
user: root
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- pgbackrest-install
|
||||||
|
Loading…
Reference in New Issue
Block a user