Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

line (28) Versions 0.6.0

Provides line editing resources for use by recipes

Berkshelf/Librarian
Policyfile
Knife
cookbook 'line', '= 0.6.0'
cookbook 'line', '= 0.6.0', :supermarket
knife cookbook site install line
knife cookbook site download line
README
Dependencies
Quality

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

add_to_list "add entry to a list"
  path "/some/file"
  pattern "People to call: "
  delim [","]
  entry "Bobby"
end

Notes

So far, the only resource implemented are

append_if_no_line
replace_or_add
delete_lines
add_to_list

add_to_list delim must be an array of 1 or 2 muli-character elements. If one delimiter is given, it is assumed that either the delimiter or the given search pattern will proceed each entry and each entry will be followed by either the delimeter or a new line character: delim [","] People to call: Joe, Bobby, Karen People to call: Joe, Karen, Bobby People to call: Bobby, Joe, Karen

  If two delimiters are given, they will suround each entry. For Example:
  delim ["(,",",)"]
      People to call: (,Joe,)(,Bobby,)(,Karen,)

More to follow.

Recipes

tester - A recipe to exercise the resources

Author

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

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

al_agents Applicable Versions
autofs Applicable Versions
aws-kinesis-agent Applicable Versions
bash_history_timestamp Applicable Versions
chamber-kibana Applicable Versions
chefdk_bootstrap Applicable Versions
cis-el7-l1-hardening Applicable Versions
dynatrace Applicable Versions
dynatrace-appmon Applicable Versions
elk Applicable Versions
elkstack Applicable Versions
fipsify Applicable Versions
fqdn Applicable Versions
jenkinsstack Applicable Versions
linux-tweak Applicable Versions
nfs Applicable Versions
nyan-cat Applicable Versions
ocserv Applicable Versions
openvpnas Applicable Versions
ps1 Applicable Versions
puncha-kibana Applicable Versions
rc Applicable Versions
zf2 Applicable Versions

Foodcritic Metric
            

0.6.0 failed this metric

FC031: Cookbook without metadata file: /tmp/cook/ccac7251f4fd7ee40c04a073/line/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/ccac7251f4fd7ee40c04a073/line/metadata.rb:1