Description
A few weeks back I tested installation of this formula on Fedora/Debian/OpenSUSE without pillars and this worked good. Repeating this test "with pillars" using pillar.example as template was unsuccessful as many individual states failed. I solved by including following in pillar.example.
postgres:
use_upstream_repo: False
version: '9.6'
{% if salt'grains.get' == 'RedHat' or salt'grains.get' == 'SUSE' %}
pkgs_extra: [ postgresql-contrib, postgresql-plpython, postgresql-jdbc, postgresql-docs]
{% elif salt'grains.get' == 'Debian' %}
pkg: postgresql-9.6
pkgs_extra: [ postgresql-contrib, postgresql-plpython-9.6, libpostgresql-jdbc-java]
python: python-psycopg2
conf_dir: /var/lib/postgresql/data
postgresconf: ""
{% endif %}prepare_cluster:
{% if salt'grains.get' == 'RedHat' %}
command: /usr/bin/initdb --pgdata=/var/lib/pgsql/data
test: test -f /var/lib/pgsql/data/PG_VERSION
{% elif salt'grains.get' == 'SUSE' %}
command: /usr/lib/postgresql/9.6/bin/initdb --pgdata=/var/lib/pgsql/data
test: test -f /var/lib/pgsql/data/PG_VERSION
{% elif salt'grains.get' == 'Debian' %}
command: /usr/lib/postgresql/9.6/bin/initdb --pgdata=/var/lib/postgresql/data
test: test -f /var/lib/postgresql/data/PG_VERSION
{% endif %}
user: postgres
env: {}
Should I raise PR to update pillar.example with same (perhaps commented out) as workaround to help others?