postgres-formula/pillar.example
Edvinas Klovas d7580104f6 Add support for database extensions.
This commit adds support for database extensions via
salt.states.postgres_extension

When configuring database pillar data all you need to do is add (optional)
extension list with the extensions that you want the state to apply to specific
database. Example:

    db1:
      owner: 'localUser'
      user: 'localUser'
      template: 'template0'
      lc_ctype: 'C.UTF-8'
      lc_collate: 'C.UTF-8'
      extensions:
        - uuid-ossp

This will make sure `uuid-ossp` extension is enabled on `db1` database.

Updated pillar.example to include (optional) extensions
2015-07-23 17:54:24 +03:00

56 lines
1.3 KiB
Text

postgres:
pg_hba.conf: salt://postgres/pg_hba.conf
use_upstream_repo: False
lookup:
pkg: 'postgresql-9.3'
pkg_client: 'postgresql-client-9.3'
pg_hba: '/etc/postgresql/9.3/main/pg_hba.conf'
users:
localUser:
password: '98ruj923h4rf'
createdb: False
createroles: False
createuser: False
inherit: True
replication: False
remoteUser:
password: '98ruj923h4rf'
createdb: False
createroles: False
createuser: False
inherit: True
replication: False
# This section cover this ACL management of the pg_hba.conf file.
# <type>, <database>, <user>, [host], <method>
acls:
- ['local', 'db1', 'localUser']
- ['host', 'db2', 'remoteUser', '123.123.0.0/24']
databases:
db1:
owner: 'localUser'
user: 'localUser'
template: 'template0'
lc_ctype: 'C.UTF-8'
lc_collate: 'C.UTF-8'
# optional extensions to enable on database
extensions:
- uuid-ossp
db2:
owner: 'localUser'
user: 'remoteUser'
template: 'template0'
lc_ctype: 'C.UTF-8'
lc_collate: 'C.UTF-8'
# optional extensions to enable on database
extensions:
- postgis
# This section will append your configuration to postgresql.conf.
postgresconf: |
listen_addresses = 'localhost,*'