Skip to content

slaxx/poise

This branch is 509 commits behind poise/poise:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c713f80 · Jan 3, 2014

History

46 Commits
Dec 29, 2013
Dec 29, 2013
Nov 7, 2013
Dec 24, 2013
Dec 29, 2013
Dec 25, 2013
Dec 24, 2013
Dec 26, 2013
Dec 24, 2013
Jan 3, 2014
Jan 3, 2014
Nov 12, 2013
Dec 24, 2013
Jan 3, 2014

Repository files navigation

Poise

Build Status

The poise cookbook provides patterns and helpers for writing reusable Chef code.

Quick start

Create a libraries/default.rb file in your cookbook like so:

class Chef
  class Resource::MyResource < Resource
    include Poise
    actions(:enable, :disable)
    attribute(:path, kind_of: String)
  end

  class Provider::MyResource < Provider
    def action_enable
      converge_by("enable resource #{new_resource.name}") do
        notifying_block do
          ... # Normal Chef recipe code goes here
        end
      end
    end
  end
end

You can then use this resource like any other Chef resource:

my_resource 'one' do
  path '/tmp'
end

Patterns

Notifying Block

Module: Poise::Provider::NotifyingBlock

Include Recipe

Sub-resources

Container

Child

Lazy Attribute Default

Option Collector

Helpers

LWRP API

Resource Name

Using the Poise module

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published