cookbook 'psql', '~> 0.2.0'
psql (2) Versions 0.2.0 Follow3
A set of LWRPs for interacting with postgres using the CLI.
cookbook 'psql', '~> 0.2.0', :supermarket
knife supermarket install psql
knife supermarket download psql
Description
A set of LWRPs for interacting with postgres using the CLI.
Dependencies
The cookbook requires the 'psql' client utility for postgres to be installed on the node. However there is no depedence on a
cookbook that installs this utlility. One can be found here: https://github.com/opscode-cookbooks/postgresql.git
Requirements
Platform:
No platforms defined
Cookbooks:
- cutlery (~> 0.1)
Attributes
No attributes defined
Recipes
No recipes defined
Resources
psql_database
Actions
- create: Default action.
- drop:
- owner:
Attribute Parameters
- host:
- port: Defaults to <code>5432</code>.
- admin_username: Defaults to <code>nil</code>.
- admin_password: Defaults to <code>nil</code>.
- database:
- owner:
- encoding: Defaults to <code>"DEFAULT"</code>.
- template: Defaults to <code>nil</code>.
- tablespace: Defaults to <code>nil</code>.
- collation: Defaults to <code>nil</code>.
- connection_limit: Defaults to <code>nil</code>.
- bash_user: Defaults to <code>"postgres"</code>.
- bash_group: Defaults to <code>"postgres"</code>.
psql_exec
Actions
- run: Default action.
Attribute Parameters
- command:
- host:
- port: Defaults to <code>5432</code>.
- admin_username: Defaults to <code>nil</code>.
- admin_password: Defaults to <code>nil</code>.
- dbname:
- match: Defaults to <code>nil</code>.
- returns: Defaults to <code>0</code>.
- bash_user: Defaults to <code>"postgres"</code>.
- bash_group: Defaults to <code>"postgres"</code>.
psql_exec_file
Actions
- run: Default action.
Attribute Parameters
- command_file:
- host:
- port: Defaults to <code>5432</code>.
- admin_username: Defaults to <code>nil</code>.
- admin_password: Defaults to <code>nil</code>.
- dbname:
- match: Defaults to <code>nil</code>.
- returns: Defaults to <code>0</code>.
psql_permission
Actions
- grant: Default action.
- revoke:
Attribute Parameters
- host:
- port: Defaults to <code>5432</code>.
- admin_username: Defaults to <code>nil</code>.
- admin_password: Defaults to <code>nil</code>.
- username:
- database:
- permissions:
- bash_user: Defaults to <code>"postgres"</code>.
- bash_group: Defaults to <code>"postgres"</code>.
psql_schema
Actions
- grant_usage: Default action.
Attribute Parameters
- host:
- port: Defaults to <code>5432</code>.
- admin_username: Defaults to <code>nil</code>.
- admin_password: Defaults to <code>nil</code>.
- database:
- schema:
- username:
- bash_user: Defaults to <code>"postgres"</code>.
- bash_group: Defaults to <code>"postgres"</code>.
psql_user
Actions
- create: Default action.
- drop:
Attribute Parameters
- host:
- port: Defaults to <code>5432</code>.
- admin_username: Defaults to <code>nil</code>.
- admin_password: Defaults to <code>nil</code>.
- username:
- password:
- grant_create_db: Defaults to <code>false</code>.
- bash_user: Defaults to <code>"postgres"</code>.
- bash_group: Defaults to <code>"postgres"</code>.
Usage
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
License and Maintainer
Maintainer:: Peter Donald (peter@realityforge.org)
Contributors::
* André Hester
License:: Apache 2.0
Dependent cookbooks
cutlery ~> 0.1 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
0.2.0 (Pending):
- Add support for psql_exec_file LWRP. Submitted by André Hester.
0.1.0:
- Initial release.
Collaborator Number Metric
0.2.0 failed this metric
Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.2.0 failed this metric
FC064: Ensure issues_url is set in metadata: psql/metadata.rb:1
FC065: Ensure source_url is set in metadata: psql/metadata.rb:1
FC066: Ensure chef_version is set in metadata: psql/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: psql/metadata.rb:1
FC069: Ensure standardized license defined in metadata: psql/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.2.0 failed this metric
FC064: Ensure issues_url is set in metadata: psql/metadata.rb:1
FC065: Ensure source_url is set in metadata: psql/metadata.rb:1
FC066: Ensure chef_version is set in metadata: psql/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: psql/metadata.rb:1
FC069: Ensure standardized license defined in metadata: psql/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
FC065: Ensure source_url is set in metadata: psql/metadata.rb:1
FC066: Ensure chef_version is set in metadata: psql/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: psql/metadata.rb:1
FC069: Ensure standardized license defined in metadata: psql/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.2.0 passed this metric
Testing File Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.2.0 failed this metric
0.2.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number