mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 01:30:25 +00:00
Handle postgres dev package dependencies
This commit is contained in:
parent
6840bf3839
commit
e3ffa44810
3 changed files with 11 additions and 13 deletions
|
@ -7,6 +7,7 @@ postgres:
|
||||||
pkgs_extra: []
|
pkgs_extra: []
|
||||||
pkg_client: postgresql-client
|
pkg_client: postgresql-client
|
||||||
pkg_dev: postgresql-devel
|
pkg_dev: postgresql-devel
|
||||||
|
pkg_dev_deps: []
|
||||||
pkg_libpq_dev: libpq-dev
|
pkg_libpq_dev: libpq-dev
|
||||||
pkg_libs: postgresql-libs
|
pkg_libs: postgresql-libs
|
||||||
pkg_python: python-psycopg2
|
pkg_python: python-psycopg2
|
||||||
|
|
|
@ -1,26 +1,18 @@
|
||||||
{% from tpldir + "/map.jinja" import postgres with context %}
|
{% from tpldir + "/map.jinja" import postgres with context %}
|
||||||
|
|
||||||
{% if grains.os not in ('Windows', 'MacOS',) %}
|
{% if grains.os not in ('Windows', 'MacOS',) %}
|
||||||
|
{%- set pkgs = [postgres.pkg_dev, postgres.pkg_libpq_dev] + postgres.pkg_dev_deps %}
|
||||||
|
|
||||||
{% if postgres.pkg_dev %}
|
{% if pkgs %}
|
||||||
install-postgres-dev-package:
|
install-postgres-dev-packages:
|
||||||
pkg.installed:
|
pkg.installed:
|
||||||
- name: {{ postgres.pkg_dev }}
|
- pkgs: {{ pkgs }}
|
||||||
{% if postgres.fromrepo %}
|
{% if postgres.fromrepo %}
|
||||||
- fromrepo: {{ postgres.fromrepo }}
|
- fromrepo: {{ postgres.fromrepo }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if postgres.pkg_libpq_dev %}
|
# Alternatives system. Make devclient binaries available in $PATH
|
||||||
install-postgres-libpq-dev:
|
|
||||||
pkg.installed:
|
|
||||||
- name: {{ postgres.pkg_libpq_dev }}
|
|
||||||
{% if postgres.fromrepo %}
|
|
||||||
- fromrepo: {{ postgres.fromrepo }}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
# Alternatives system. Make devclient binaries available in $PATH
|
|
||||||
{%- if 'bin_dir' in postgres and postgres.linux.altpriority %}
|
{%- if 'bin_dir' in postgres and postgres.linux.altpriority %}
|
||||||
{%- for bin in postgres.dev_bins %}
|
{%- for bin in postgres.dev_bins %}
|
||||||
{%- set path = salt['file.join'](postgres.bin_dir, bin) %}
|
{%- set path = salt['file.join'](postgres.bin_dir, bin) %}
|
||||||
|
|
|
@ -101,6 +101,11 @@ RedHat:
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
pkg_libpq_dev: libpqxx-devel
|
pkg_libpq_dev: libpqxx-devel
|
||||||
|
pkg_dev_deps:
|
||||||
|
- perl-Time-HiRes
|
||||||
|
- libicu-devel
|
||||||
|
- perl-IPC-Run
|
||||||
|
- perl-Test-Simple
|
||||||
|
|
||||||
Suse:
|
Suse:
|
||||||
pkg_repo:
|
pkg_repo:
|
||||||
|
|
Loading…
Add table
Reference in a new issue