A set of LWRPs for interacting with postgres using the CLI.
No platforms defined
- cutlery (~> 0.1)
No attributes defined
No recipes defined
- create: Default action.
- drop:
- host:
- port: Defaults to
5432
. - admin_username: Defaults to
nil
. - admin_password: Defaults to
nil
. - database:
- owner:
- encoding: Defaults to
"DEFAULT"
. - template: Defaults to
nil
. - tablespace: Defaults to
nil
. - collation: Defaults to
nil
. - connection_limit: Defaults to
nil
.
- run: Default action.
- command:
- host:
- port: Defaults to
5432
. - admin_username: Defaults to
nil
. - admin_password: Defaults to
nil
. - dbname:
- match: Defaults to
nil
. - returns: Defaults to
0
.
- grant: Default action.
- revoke:
- host:
- port: Defaults to
5432
. - admin_username: Defaults to
nil
. - admin_password: Defaults to
nil
. - username:
- database:
- permissions:
- create: Default action.
- drop:
- host:
- port: Defaults to
5432
. - admin_username: Defaults to
nil
. - admin_password: Defaults to
nil
. - username:
- password:
- grant_create_db: Defaults to
false
.
The cookbook is simply a set of LWRPs that you can use in your own cookbook. A simple example follows.
psql_user "myuser" do
host node['fqdn']
port node['postgresql']['config']['port']
admin_username 'postgres'
admin_password node['postgresql']['password']['postgres']
password 'secret'
end
psql_database "mydatabase" do
host node['fqdn']
port node['postgresql']['config']['port']
admin_username 'postgres'
admin_password node['postgresql']['password']['postgres']
owner 'myuser'
template 'template_postgis'
encoding 'DEFAULT'
tablespace 'MyTablespace'
collation 'fr_FR'
connection_limit -1
end
psql_permission "myuser@mydatabase => all" do
host node['fqdn']
port node['postgresql']['config']['port']
admin_username 'postgres'
admin_password node['postgresql']['password']['postgres']
username 'myuser'
database 'mydatabase'
permissions ['ALL']
end
Maintainer:: Peter Donald ([email protected])
License:: Apache 2.0