Skip to content

Instantly share code, notes, and snippets.

View charlesjohnson's full-sized avatar

Charles Johnson charlesjohnson

View GitHub Profile
Its a cookbook class that we use to abstract cookbooks and their
dependencies. The key method to look at is dependency_hash which creates
a hash based on the dependencies of the cookbook.
We do not explicitly do a reverse dependency lookup but we can use this
hash to infer a change in dependencies from a change in any cookbook in
an environment. So the flow is:
1. I change cookbook A and it gets sent to the chef server and indexed
@charlesjohnson
charlesjohnson / config.json
Last active December 31, 2015 18:39 — forked from micgo/CentOS Berkshelf Config
~/.berkshelf/config.json
{
"vagrant": {
"vm": {
"box": "opscode-centos-6.5",
"box_url": "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box",
"forward_port": {},
"network": {
"bridged": false
},
"provision": "chef_solo"
<% if @port != 80 -%>
Listen <%= @port %>
<% end -%>
<VirtualHost *:<%= @port %>>
ServerAdmin webmaster@localhost
DocumentRoot <%= @document_root %>
<Directory />
Options FollowSymLinks
@charlesjohnson
charlesjohnson / gist:4033583
Created November 7, 2012 18:50
Conditional notification example
template "/etc/bind/named.conf.local" do
source "named.conf.local.erb"
owner "root"
group "bind"
mode 00644
variables({
:role => node["bind"]["role"],
:masters => node["bind"]["masters"],
:directory => node["bind"]["zone_dir"]
})