From da6643a1f7055dfcc284f9b68017551137c25184 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sat, 16 Jul 2022 00:48:32 +0200 Subject: [PATCH] updated postgresql state --- states/postgresql/defaults.yaml | 8 ++++++++ states/postgresql/install.sls | 9 ++++----- states/postgresql/service.sls | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/states/postgresql/defaults.yaml b/states/postgresql/defaults.yaml index b4535cb..f1a9d07 100644 --- a/states/postgresql/defaults.yaml +++ b/states/postgresql/defaults.yaml @@ -1,5 +1,13 @@ --- postgresql: + packages: + - pgpool2 + - postgresql-13 + - postgresql-13-cron + - postgresql-13-pgpool2 + - postgresql-13-repmgr + - postgresql-client-13 + - repmgr databases: - name: postgres user: postgres diff --git a/states/postgresql/install.sls b/states/postgresql/install.sls index 3b3de99..438fb68 100644 --- a/states/postgresql/install.sls +++ b/states/postgresql/install.sls @@ -1,9 +1,8 @@ --- +{%- from "postgresql/map.jinja" import postgresql with context %} postgresql-install: pkg.latest: - pkgs: - - postgresql - - postgresql-client - - postgresql-13-cron - - postgresql-13-repmgr - - repmgr +{%- for pkg in postgresql.packages %} + - {{ pkg }} +{%- endfor %} diff --git a/states/postgresql/service.sls b/states/postgresql/service.sls index ea63c95..4fb29a9 100644 --- a/states/postgresql/service.sls +++ b/states/postgresql/service.sls @@ -1,5 +1,5 @@ --- postgresql-service: service.running: - - name: postgresql + - name: postgresql@13-main - enable: true