mirror of
https://github.com/saltstack-formulas/postgres-formula.git
synced 2025-04-16 01:30:25 +00:00
104 lines
2.9 KiB
YAML
104 lines
2.9 KiB
YAML
postgres:
|
|
# Set True to configure upstream postgresql.org repository for YUM or APT
|
|
use_upstream_repo: False
|
|
# Version to install from upstream repository
|
|
version: '9.3'
|
|
|
|
# These are Debian/Ubuntu specific package names
|
|
pkg: 'postgresql-9.3'
|
|
pkg_client: 'postgresql-client-9.3'
|
|
|
|
# Addtional packages to install, this should be in a list format
|
|
pkgs_extra:
|
|
- postgresql-contrib
|
|
- postgresql-plpython
|
|
|
|
# Path to the `pg_hba.conf` file Jinja template on Salt Fileserver
|
|
pg_hba.conf: salt://postgres/templates/pg_hba.conf.j2
|
|
|
|
# This section covers ACL management in the `pg_hba.conf` file.
|
|
# acls list controls: which hosts are allowed to connect, how clients
|
|
# are authenticated, which PostgreSQL user names they can use, which
|
|
# databases they can access. Records take one of these forms:
|
|
#
|
|
#acls:
|
|
# - ['local', 'DATABASE', 'USER', 'METHOD']
|
|
# - ['host', 'DATABASE', 'USER', 'ADDRESS', 'METHOD']
|
|
# - ['hostssl', 'DATABASE', 'USER', 'ADDRESS', 'METHOD']
|
|
# - ['hostnossl', 'DATABASE', 'USER', 'ADDRESS', 'METHOD']
|
|
#
|
|
# The uppercase items must be replaced by actual values.
|
|
# METHOD could be omitted, 'md5' will be appended by default.
|
|
acls:
|
|
- ['local', 'db1', 'localUser']
|
|
- ['host', 'db2', 'remoteUser', '123.123.0.0/24']
|
|
|
|
# PostgreSQL service name
|
|
service: postgresql
|
|
|
|
users:
|
|
localUser:
|
|
ensure: present
|
|
password: '98ruj923h4rf'
|
|
createdb: False
|
|
createroles: False
|
|
createuser: False
|
|
inherit: True
|
|
replication: False
|
|
|
|
remoteUser:
|
|
ensure: present
|
|
password: '98ruj923h4rf'
|
|
createdb: False
|
|
createroles: False
|
|
createuser: False
|
|
inherit: True
|
|
replication: False
|
|
|
|
absentUser:
|
|
ensure: absent
|
|
password: '98ruj923h4rf'
|
|
createdb: False
|
|
createroles: False
|
|
createuser: False
|
|
inherit: True
|
|
replication: False
|
|
|
|
tablespaces:
|
|
my_space:
|
|
directory: /srv/my_tablespace
|
|
owner: localUser
|
|
|
|
databases:
|
|
db1:
|
|
owner: 'localUser'
|
|
template: 'template0'
|
|
lc_ctype: 'en_US.UTF-8'
|
|
lc_collate: 'en_US.UTF-8'
|
|
# optional schemas to enable on database
|
|
schemas:
|
|
uuid_ossp:
|
|
owner: localUser
|
|
# optional extensions to enable on database
|
|
extensions:
|
|
uuid-ossp:
|
|
schema: uuid_ossp
|
|
db2:
|
|
owner: 'localUser'
|
|
user: 'remoteUser'
|
|
template: 'template0'
|
|
lc_ctype: 'en_US.UTF-8'
|
|
lc_collate: 'en_US.UTF-8'
|
|
tablespace: 'my_space'
|
|
# optional extensions to enable on database
|
|
# extensions:
|
|
# postgis:
|
|
|
|
# backup extension defaults to .bak if postgresconf_backup is True.
|
|
# Set to False to stop creation of backup on postgresql.conf changes.
|
|
postgresconf_backup: True
|
|
# This section will append your configuration to postgresql.conf.
|
|
postgresconf: |
|
|
listen_addresses = 'localhost,*'
|
|
|
|
# vim: ft=yaml:sw=2
|