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

Select Status

RSS

chefenv_suffix (1) Versions 0.1.0

Installs/Configures chefenv_suffix

Policyfile
Berkshelf
Knife
cookbook 'chefenv_suffix', '~> 0.1.0', :supermarket
cookbook 'chefenv_suffix', '~> 0.1.0'
knife supermarket install chefenv_suffix
knife supermarket download chefenv_suffix
README
Dependencies
Changelog
Quality 33%

chefenv_suffix

Description

A simple library helper to return the suffix of a node's chef
environment.

Assuming that you use suffixed environments like foo-test or
bar-prod, the helper embedded in this cookbook provides a simple
way to return the test or prod part of the environment name.

Usage

Add the following line to your cookbook's metadata

depends 'chefenv_suffix', '~> 0.1'

In your recipe, when you need to use the suffix somewhere:

vaultitem = chef_vault_item('mysecrets', chefenv_suffix)

Attributes

The only attribute is node['chefenv_suffix']['pattern'], which
defaults to

-?(\w+)$

And may be overridden to fix your needs. The pattern must have a
single capture group, which is the suffix the helper will return.

The default pattern is designed to match against environments
named using underscores, with a dash separator for the lifecycle
(test, prod, etc.):

foo-test
bar-prod
my_important_app-perf

The default pattern also returns _default if the node's environment
is not set.

Author

James FitzGibbon

License

Copyright (c) 2015 James FitzGibbon, All Rights Reserved.

Template

Generated from chef-gen-flavor 'nadt' v0.2.0

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Revision History for chefenv_suffix

0.1.0

  • initial version

Collaborator Number Metric
            

0.1.0 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.0 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.0 passed this metric

No Binaries Metric
            

0.1.0 passed this metric

Testing File Metric
            

0.1.0 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.0 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