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
This commit is contained in:
@@ -38,14 +38,18 @@ postgres:
|
||||
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,*'
|
||||
|
||||
Reference in New Issue
Block a user