r/wal-g-pg: Deploy WAL-G for PostgreSQL
This role installs `wal-g` from the DCH Yum repository, and creates a configuration file for it in `/etc/postgresql`. Additionally, it installs a custom SELinux policy module that allows `wal-g` to run in the `postgresql_t` domain (i.e. when spawned by the PostgreSQL server).frigate-exporter
parent
99c309240c
commit
edffaf258b
|
@ -0,0 +1 @@
|
||||||
|
(allow postgresql_t http_port_t (tcp_socket (name_connect)))
|
|
@ -0,0 +1,3 @@
|
||||||
|
- name: load wal-g-postgresql selinux module
|
||||||
|
command:
|
||||||
|
semodule -i /usr/local/share/selinux/wal-g-postgresql.cil
|
|
@ -0,0 +1,2 @@
|
||||||
|
dependencies:
|
||||||
|
- dch-yum
|
|
@ -0,0 +1,38 @@
|
||||||
|
- name: ensure wal-g is installed
|
||||||
|
package:
|
||||||
|
name: wal-g-postgresql
|
||||||
|
state: present
|
||||||
|
tags:
|
||||||
|
- install
|
||||||
|
|
||||||
|
- name: ensure wal-g is configured
|
||||||
|
copy:
|
||||||
|
content: |+
|
||||||
|
{{ wal_g_pg_config | to_nice_yaml(indent=2) }}
|
||||||
|
dest: /etc/postgresql/wal-g.yml
|
||||||
|
owner: root
|
||||||
|
group: postgres
|
||||||
|
mode: u=rw,g=r,o=
|
||||||
|
tags:
|
||||||
|
- config
|
||||||
|
|
||||||
|
- name: ensure local selinux share directory exists
|
||||||
|
file:
|
||||||
|
path: /usr/local/share/selinux
|
||||||
|
state: directory
|
||||||
|
tags:
|
||||||
|
- selinux
|
||||||
|
- name: ensure wal-g-postgresql selinux module is installed
|
||||||
|
copy:
|
||||||
|
src: wal-g-postgresql.cil
|
||||||
|
dest: /usr/local/share/selinux/wal-g-postgresql.cil
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: u=rw,go=r
|
||||||
|
notify:
|
||||||
|
- load wal-g-postgresql selinux module
|
||||||
|
tags:
|
||||||
|
- selinux
|
||||||
|
|
||||||
|
- name: flush handlers
|
||||||
|
meta: flush_handlers
|
Loading…
Reference in New Issue