Skip to content

chazzly/line-cookbook

This branch is 529 commits behind sous-chefs/line:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

82523b5 · Jun 5, 2014

History

62 Commits
Aug 8, 2013
Aug 8, 2013
Mar 4, 2014
Aug 8, 2013
Jun 5, 2014
May 30, 2014
Jul 31, 2013
Aug 8, 2013
Dec 8, 2012
Jun 5, 2014
Aug 8, 2013
Dec 8, 2012
Sep 12, 2013
Jul 31, 2013
Jul 31, 2013
Dec 8, 2012
Sep 2, 2013

Repository files navigation

line cookbook

Motivation

Quite often, the need arises to do line editing instead of managing an entire file with a template resource. This cookbook supplies various resources that will help you do this.

Usage

Add "depends 'line'" to your cookbook's metadata.rb to gain access to the resoures.

append_if_no_line "make sure a line is in dangerfile" do
  path "/tmp/dangerfile"
  line "HI THERE I AM STRING"
end

replace_or_add "spread the love" do
  path "/some/file"
  pattern "Why hello there.*"
  line "Why hello there, you beautiful person, you."
end

delete_lines "remove hash-comments from /some/file" do
  path "/some/file"
  pattern "^#.*"
end

Notes

So far, the only resource implemented are

append_if_no_line
replace_or_add
delete_lines

More to follow.

Recipes

tester - A recipe to exercise the resources

Author

Author:: Sean OMeara (someara@opscode.com)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published