Skip to content

a monkey to chef to edit existing resources in place

License

Notifications You must be signed in to change notification settings

nathenharvey/chef-edit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chef::Edit

This adds a simple function to the Chef library scope to edit and existing resource. If the given resource does not exist, a new resource will be created.

This function is designed to assist the library cookbook pattern.

Installation

Add this line to your application's Gemfile:

gem 'chef-edit'

And then execute:

$ bundle

Or install it yourself as:

$ gem install chef-edit

Usage

# file postgresql/recipes/server.rb
user "postgres" do
  uid  26
  home '/home/postgres'
  supports  :manage_home => true
end

# file my-postgresql/recipes/
chef_gem "chef-edit"
require 'chef/edit'

include_recipe "postgresql::server"

edit "user[postgres]"
  home '/var/lib/pgsql/9.2'
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

a monkey to chef to edit existing resources in place

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%