Skip to content

Commit 1e78a4e

Browse files
author
Noel McLoughlin
committed
Handle postgres dev package dependencies
1 parent 6840bf3 commit 1e78a4e

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

postgres/defaults.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,20 @@ postgres:
66
pkg: postgresql
77
pkgs_extra: []
88
pkg_client: postgresql-client
9-
pkg_dev: postgresql-devel
109
pkg_libpq_dev: libpq-dev
1110
pkg_libs: postgresql-libs
1211
pkg_python: python-psycopg2
1312
userhomes: /home
1413
user: postgres
1514
group: postgres
1615

16+
pkg_dev: postgresql-devel
17+
pkg_dev_deps:
18+
- perl-Time-HiRes
19+
- libicu-devel
20+
- perl-IPC-Run
21+
- perl-Test-Simple
22+
1723
prepare_cluster:
1824
command: initdb --pgdata=/var/lib/pgsql/data
1925
test: test -f /var/lib/pgsql/data/PG_VERSION

postgres/dev.sls

+10
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,22 @@
33
{% if grains.os not in ('Windows', 'MacOS',) %}
44
55
{% if postgres.pkg_dev %}
6+
7+
{% if grains.os_family == 'RedHat' and postgres.version|int >= 10 %}
8+
install-postgres-dev-osdependencies:
9+
pkg.installed:
10+
- pkgs: {{ postgres.pkg_dev_deps }}
11+
- require_in:
12+
- pkg: install-postgres-dev-package
13+
{% endif %}
14+
615
install-postgres-dev-package:
716
pkg.installed:
817
- name: {{ postgres.pkg_dev }}
918
{% if postgres.fromrepo %}
1019
- fromrepo: {{ postgres.fromrepo }}
1120
{% endif %}
21+
1222
{% endif %}
1323
1424
{% if postgres.pkg_libpq_dev %}

0 commit comments

Comments
 (0)