Code Monkey home page Code Monkey logo

chef-psql's Introduction

Description

Build Status

A set of LWRPs for interacting with postgres using the CLI.

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:

Attribute Parameters

  • 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.

psql_exec

Actions

  • run: Default action.

Attribute Parameters

  • 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.

psql_permission

Actions

  • grant: Default action.
  • revoke:

Attribute Parameters

  • host:
  • port: Defaults to 5432.
  • admin_username: Defaults to nil.
  • admin_password: Defaults to nil.
  • username:
  • database:
  • permissions:

psql_user

Actions

  • create: Default action.
  • drop:

Attribute Parameters

  • host:
  • port: Defaults to 5432.
  • admin_username: Defaults to nil.
  • admin_password: Defaults to nil.
  • username:
  • password:
  • grant_create_db: Defaults to false.

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 ([email protected])

License:: Apache 2.0

chef-psql's People

Contributors

crvidya avatar icaughley avatar realityforge avatar testvidya11 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.