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

run_action_now (1) Versions 0.1.0

Provides helper function for easier immediate execution of Chef resources without bulky syntax.

Berkshelf/Librarian
Policyfile
Knife
cookbook 'run_action_now', '~> 0.1.0'
cookbook 'run_action_now', '~> 0.1.0', :supermarket
knife cookbook site install run_action_now
knife cookbook site download run_action_now
README
Dependencies
Quality

run_action_now cookbook

Cookbook for Opscode Chef.

http://community.opscode.com/cookbooks/run_action_now

Description

Allows for immediate one-time execution of Chef resources without bulky syntax. Traditionally to run a resource during convergence you would have to set the action to :nothing, and then use the .run_action method with the real action you wanted. This cookbook adds the .run_action_now method which looks up the desired action(s) from the resource itself, and then sets the action to :nothing automatically.

PLEASE NOTE

When appropriate you should consider the use_inline_resources to perform this functionality globally within a LWRP. Please see the Chef docs here for more information.

Usage

Directly on a resource block:

directory "/tmp/alpha" do
  action :create
  mode 0777
end.run_action_now

(directory "/tmp/beta").run_action_now    # without a block

service "sshd" do
  action [ :enable, :start ]              # with multiple actions
end.run_action_now

As a mixin function:

include Chef::Provider::ServiceFactory::Mixin::Unix

run_action_now((
  directory "/tmp/charlie" do
    action :create
  end
))  # note the double parenthesis above and below

Recipes

This cookbook only provides library enhancements, no recipes are included.

Development and Maintenance

  • Found a bug?
  • Need some help?
  • Have a suggestion?
  • Want to contribute?

Please visit: code.binbab.org

Authors and License

  • Author:: BinaryBabel OSS (projects@binarybabel.org)
  • Copyright:: 2013 sha1(OWNER) = df334a7237f10846a0ca302bd323e35ee1463931
  • License:: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

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 failed this metric

FC064: Ensure issues_url is set in metadata: run_action_now/metadata.rb:1
FC065: Ensure source_url is set in metadata: run_action_now/metadata.rb:1
FC066: Ensure chef_version is set in metadata: run_action_now/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: run_action_now/metadata.rb:1
FC069: Ensure standardized license defined in metadata: run_action_now/metadata.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.1.0 failed this metric

run_action_now does not have a valid open source license.
Acceptable licenses include Apache-2.0, apachev2, Apache 2.0, MIT, mit, GPL-2.0, gplv2, GNU Public License 2.0, GPL-3.0, gplv3, GNU Public License 3.0.

No Binaries Metric
            

0.1.0 passed this metric

Publish Metric
            

0.1.0 passed this metric

Supported Platforms Metric
            

0.1.0 failed this metric

run_action_now should declare what platform(s) it supports.

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