Skip to content

Instantly share code, notes, and snippets.

Provider -----
action :install do
git "/opt/tumult/src" do
repository "git@github.com:pyronicide/foo.git"
revision "#{node["branch"]}"
ssh_wrapper "/opt/glue/bin/deploy_user.sh"
depth 5
action :sync
end
default[:scout][:user] = "scout"
default[:scout][:interval] = 1
#default[:scout][:group] = "scout"
#default[:scout][:version] = '5.0.3'
#default[:scout][:scout_bin] = "/usr/bin/scout"
module MCollective
module Agent
# An agent that uses Opscode to manage resources
# Original credit goes to R.I. Pienaar
class ChefExistingResource < RPC::Agent
metadata :name => "SimpleRPC Existing Chef Resource Agent",
:description => "Generic resource management",
:author => "Nicolas Szalay <nico@rottenbytes.info>",
:license => "BSD",
:version => "1.0",
{
"id": "0123456789abcdef",
"name": "myname",
"provider": "puppet",
"os": {
"name": "linux",
"version": "2.6.35-22-generic",
"vendor": "ubuntu",
"vendor_version": "10.10"
},
@adamhjk
adamhjk / README
Created October 28, 2010 16:29 — forked from kennethkalmer/README
Prototype mysql_grant provider for Chef
---------------------------------------
Drop the two files into your mysql cookbook, and experiment with the following examples:
mysql_grant "kenneth" do
action :grant
username "root" # <- User with admin privs
password node[:mysql][:server_root_password]
# Actual grant details
[Thu, 07 Jan 2010 19:55:05 -0500] INFO: Starting Chef Solo Run
[Thu, 07 Jan 2010 19:55:06 -0500] WARN: Missing gem 'right_aws'
before migrate
before include
inside poller recipe
/srv/chef/channels-reader-is/chef/chef-repo/site-cookbooks/channels_batchrunner/recipes/poller.rb:34:in `join': can't convert nil into String (TypeError)
from /srv/chef/channels-reader-is/chef/chef-repo/site-cookbooks/channels_batchrunner/recipes/poller.rb:34:in `from_file'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.14/lib/chef/mixin/recipe_definition_dsl_core.rb:68:in `instance_eval'
from /usr/lib/ruby/gems/1.8/gems/chef-0.7.14/lib/chef/mixin/recipe_definition_dsl_core.rb:68:in `method_missing'
from /srv/chef/channels-reader-is/chef/chef-repo/site-cookbooks/channels_batchrunner/recipes/poller.rb:30:in `from_file'
module NtT
def self.node_to_text(hash_t, spacer)
output = ''
for k, v in hash_t
if v.is_a?(Hash)
output += spacer + "#{k.to_s} :\n"
output += node_to_text(v, spacer + ' ')
else
output += spacer + "#{k.to_s} : #{v.to_s}\n"
link "/etc/pure-ftpd/auth/70puredb" do
to "../conf/PureDB"
notifies :restart, resources(:service => "pure-ftpd")
# If the symlink exists and it points to the "TO" file then don't do anything
not_if do
File.symlink?("#{name}") & (File.readlink("#{name}") == to)
end
end
@adamhjk
adamhjk / .emacs
Created December 11, 2008 23:25 — forked from plathrop/.emacs
(setq user-full-name "Adam Jacob"
user-mail-address "not-plathrop@digg.com")
(require 'cl)
(setq-default indent-tabs-mode nil)
(setq inhibit-startup-message t
require-final-newline t
backup-directory-alist'((".*" . "~/emacs/backups"))