2016-09-05 13:49:33 +03:00
|
|
|
{% macro ubuntu_block(name, version) %}
|
2016-09-03 15:15:56 +03:00
|
|
|
|
2016-09-09 11:36:26 +03:00
|
|
|
{% if salt['pillar.get']('postgres:use_upstream_repo', False) %}
|
|
|
|
{% set version = salt['pillar.get']('postgres:version', '9.5') %}
|
|
|
|
{% endif %}
|
2016-09-03 15:15:56 +03:00
|
|
|
|
2016-07-08 16:03:55 -04:00
|
|
|
{{ name }}:
|
|
|
|
pkg_repo: deb http://apt.postgresql.org/pub/repos/apt/ {{ name }}-pgdg main
|
2016-09-03 15:15:56 +03:00
|
|
|
pkg: postgresql-{{ version }}
|
|
|
|
pkg_client: postgresql-client-{{ version }}
|
2016-07-08 16:03:55 -04:00
|
|
|
conf_dir: /etc/postgresql/{{ version }}/main
|
2016-07-08 15:34:45 -05:00
|
|
|
prepare_cluster:
|
|
|
|
command: pg_createcluster {{ version }} main
|
|
|
|
test: test -f /var/lib/postgresql/{{ version }}/main/PG_VERSION && test -f /etc/postgresql/{{ version }}/main/postgresql.conf
|
|
|
|
user: root
|
2016-07-19 10:09:39 -05:00
|
|
|
env: {}
|
2016-09-03 15:15:56 +03:00
|
|
|
|
2016-09-05 13:49:33 +03:00
|
|
|
{% endmacro %}
|
2016-07-07 15:41:44 -04:00
|
|
|
|
2016-09-05 13:49:33 +03:00
|
|
|
# Debian GNU/Linux
|
2016-07-08 16:03:55 -04:00
|
|
|
{{ ubuntu_block('wheezy', 9.1) }}
|
2016-09-05 13:49:33 +03:00
|
|
|
{{ ubuntu_block('jessie', 9.4) }}
|
2016-07-07 15:41:44 -04:00
|
|
|
|
2016-09-05 13:49:33 +03:00
|
|
|
# Ubuntu
|
2016-07-08 16:03:55 -04:00
|
|
|
{{ ubuntu_block('trusty', 9.3) }}
|
|
|
|
{{ ubuntu_block('precise', 9.4) }}
|
|
|
|
{{ ubuntu_block('utopic', 9.4) }}
|
|
|
|
{{ ubuntu_block('vivid', 9.4) }}
|
|
|
|
{{ ubuntu_block('wily', 9.4) }}
|
|
|
|
{{ ubuntu_block('xenial', 9.5) }}
|
2016-09-05 13:49:33 +03:00
|
|
|
|
|
|
|
# vim: ft=sls
|