Skip to content

Instantly share code, notes, and snippets.

# force ohai to run and pick up new languages.java data
ruby_block "reload_ohai" do
block do
o = Ohai::System.new
o.all_plugins
node.automatic_attrs.merge! o.data
end
action :nothing
end
@thommay
thommay / gist:2788183
Created May 25, 2012 13:31
indiana aws images
http://wiki.openindiana.org/oi/Creating+OpenIndiana+EC2+image
http://mirrorshades.net/post/4685833962
adservers=newDS()
permitted=newDS()
function preresolve(dq)
if permitted:check(dq.qname) or (not adservers:check(dq.qname)) then
return false
end
if(dq.qtype == pdns.A) then
dq:addAnswer(dq.qtype, "127.0.0.1")
class powerdns::mysql inherits powerdns {
package {"pdns-backend-mysql" : ensure => 'latest' }
File ["/etc/powerdns/pdns.d/pdns.local"] {
source => "puppet:///powerdns/pdns.local.mysql",
}
}
debug: rdoc: found new class powerdns::mysql
#[macro_use]
extern crate clap;
extern crate chef;
extern crate chef_api;
extern crate serde_json;
use chef_api::api_client::*;
use chef::models::DataBagItemList;
use clap::{Arg, App};
resource_name :email_alias
property :address
property :recipients, Array
default_action :create
action :create do
with_run_context :root do
<% @aliases.keys.each do |al| -%>
<%= al %>
- <%= @aliases[al].join(",")%>
<% end -%>
@thommay
thommay / keybase.md
Created July 29, 2016 06:13
keybase.md

Keybase proof

I hereby claim:

  • I am thommay on github.
  • I am thommay (https://keybase.io/thommay) on keybase.
  • I have a public key ASBg-5tM1ZM1NQWer1AHl5lauTk37lkYmFwLOQ0wM_avkAo

To claim this, I am signing this object:

pkg = case node['platform']
when "fedora"
"foo.i586"
when "centos"
if node["platform_version"] < 6.0
"foo.i386"
else
"foo.i586"
end
end
require 'pp'
require 'kitchen'
module Kitchen
module Driver
class Truthy < Kitchen::Driver::SSHBase
default_config :truthy, true