mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-15 17:20:25 +00:00
19 lines
911 B
YAML
19 lines
911 B
YAML
# This file allows to get PostgreSQL version and upstream repo settings
|
|
# early from Pillar to set correct lookup dictionaty items
|
|
|
|
{% import_yaml "postgres/defaults.yaml" as defaults %}
|
|
|
|
use_upstream_repo: {{ salt['pillar.get']('postgres:use_upstream_repo', defaults.postgres.use_upstream_repo) }}
|
|
version: {{ salt['pillar.get']('postgres:version', defaults.postgres.version) }}
|
|
fromrepo: {{ salt['pillar.get']('postgres:fromrepo', defaults.postgres.fromrepo) }}
|
|
cluster_name: {{ salt['pillar.get']('postgres:cluster:name', defaults.postgres.cluster.name) }}
|
|
|
|
#Early lookup for system user on MacOS
|
|
{% if grains.os == 'MacOS' %}
|
|
{% set sysuser = salt['pillar.get']('postgres:user', salt['cmd.run']("stat -f '%Su' /dev/console")) %}
|
|
{% set sysgroup = salt['pillar.get']('postgres:group', salt['cmd.run']("stat -f '%Sg' /dev/console")) %}
|
|
user: {{ sysuser }}
|
|
group: {{ sysgroup }}
|
|
{% endif %}
|
|
|
|
# vim: ft=sls
|