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

ultimate_config_cookbook (8) Versions 0.1.7

Installs/Configures ultimate_config_cookbook

Berkshelf/Librarian
Policyfile
Knife
cookbook 'ultimate_config_cookbook', '~> 0.1.7'
cookbook 'ultimate_config_cookbook', '~> 0.1.7', :supermarket
knife cookbook site install ultimate_config_cookbook
knife cookbook site download ultimate_config_cookbook
README
Dependencies
Quality 33%

Ultimate Config Cookbook for CHEF

Ultimate Config Cookbook @ CHEF Supermarket

Supported formats:

  • INI
  • JSON
  • YAML
  • TOML
  • Java Properties
  • Plist

Install

Knife

knife cookbook site install ultimate_config_cookbook
knife cookbook site download ultimate_config_cookbook

Policyfile

cookbook 'ultimate_config_cookbook', '~> 0.1.0', :supermarket

Berkshelf/Librarian

cookbook 'ultimate_config_cookbook', '~> 0.1.0'

Example

Datasource

Use attributes or Hash for your config. For INI files use first level for section name and 2nd level for key=value.

Attributes example

default['config1']['section1']['prop1'] = 'val1'
default['config1']['section1']['prop2'] = 'val2'
default['config1']['section2']['prop3'] = 'val3'

Hash example

config = {
  'section1' => {
    'prop1' => 'val1',
    'prop2' => 'val2'
  },
  'section2' => {
    'prop3' => 'val3'
  }
}

Recipe

properties:

  • file_content - config hash, can be a reference to attribute or just Hash, for ini the use the fist level for sections.
  • action - supported actions:
    • create
    • edit
    • create_or_edit
    • delete
    • replace

INI Example

ini_file '/tmp/4.ini' do
  file_content node.default['config1']
  action :create
end

JSON Example

json_file '/tmp/4.json' do
  file_content node.default['config1']
  action :create
end

YAML Example

yaml_file '/tmp/4.yaml' do
  file_content node.default['config1']
  action :create
end

TOML Example

toml_file '/tmp/4.toml' do
  file_content node.default['config1']
  action :create
end

Java Properties Example

properties_file '/tmp/4.properties' do
  file_content node.default['config1']
  action :create
end

Plist Example

Plist config example

plist_config = {
  "first_key" => "val1",
  "int" => 1,
  "float" => 1.2343,
  "boolean" => true,
  "time" => Time.now,
  "date" => Date.today,
  "datetime" => DateTime.now,
  "strings" => ["a", "b", "c"],
  "ints" => [1,2,3],
  "hashes" => [{:a => "a"}, {:b => "b"}, {:c => "c"}]
}

Plist execute example

plist_file '/tmp/4.plist' do
  file_content plist_config
  action :create
end

Changelog

  • 0.1.7 - Plist
  • 0.1.6 - Java Properties Support
  • 0.1.4 - TOML Support
  • 0.1.3 - YAML Support

License and Authors

The MIT License (MIT)

Copyright:: 2017, Garry Lachman
https://github.com/garrylachman/chef-ultimate-config-cookbook

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

CHEF

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.1.7 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.7 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.1.7 failed this metric

FC067: Ensure at least one platform supported in metadata: ultimate_config_cookbook/metadata.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.1.7 passed this metric

No Binaries Metric
            

0.1.7 passed this metric

Publish Metric
            

0.1.7 passed this metric

Supported Platforms Metric
            

0.1.7 failed this metric

ultimate_config_cookbook should declare what platform(s) it supports.

Testing File Metric
            

0.1.7 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.1.7 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number