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

twitter (4) Versions 1.0.2

Installs/Configures tweeter the twitterer for windows redhat centos fedora ubuntu debian

Policyfile
Berkshelf
Knife
cookbook 'twitter', '= 1.0.2', :supermarket
cookbook 'twitter', '= 1.0.2'
knife supermarket install twitter
knife supermarket download twitter
README
Dependencies
Quality -%

Description

Installs twitter gem and Chef library to provide easy tweeting in recipes via Twitter:tweet()

Requirements

Rubygems; works on linux and windows!

Attributes

Tune to set temp and location of your encrypted data bag secret, the name of your encrypted data bag for secret twitter application settings, the name of your twitter application, and any default tags to tweet at.

Usage

Check out full functioned example.rb for details by adding "twitter" and "twitter::example" to the run list, then let chef run twice.

The first time through generates a safe "ERROR: ruby_block[tweet_example](twitter::example line 42) had an error: uninitialized constant Chef::Recipe::Tweeter::Twitter error" message; the next times work as expected. Do not know how to tell chef to reload libraries mid-run... That might solve the first error. See http://tickets.opscode.com/browse/CHEF-1027 for more information.

1
register your [:twitter][:user] app account
https://dev.twitter.com/

2
create and distribute a pre-shared "encrypted_data_bag_secret" file to all nodes (if you do not already have one)
http://wiki.opscode.com/display/chef/Encrypted+Data+Bags

2
create the encrypted [:twitter][:databag] data bag to hold your [:twitter][:user] secret app settings

knife data bag create --secret-file /path/encrypted_data_bag_secret tweeter twitter_name

3
edit json secret [:twitter][:user] app settings inside your [:twitter][:databag] encrypted data bag

knife data bag edit --secret-file /path/encrypted_data_bag_secret tweeter twitter_name

{
"id": "twitter_name",
"consumer_key": "string",
"consumer_secret": "string",
"oauth_token": "string",
"oauth_token_secret": "string"
}

4
node[:twitter][:admin].each { |a|

  Tweeter.tweet(a, "if you use @nikeplus you should have an account on http://bit.ly/smashrun smashrun", settings["consumer_key"], settings["consumer_secret"], settings["oauth_token"], settings["oauth_token_secret"]) }

5
profit

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

cerberus Applicable Versions

No quality metric results found