Skip to content

Instantly share code, notes, and snippets.

View mdkent's full-sized avatar

Matthew Kent mdkent

  • Basecamp
  • Nanaimo, BC, Canada
View GitHub Profile
if node['dmi']['system']['manufacturer'] == "Dell Inc."
source_file = "set_hostname-physical"
else
source_file = "set_hostname"
end
cookbook_file "/etc/init.d/set_hostname" do
source source_file
owner "root"
group "root"
#!/bin/bash
knife "$@" -c ~/.chef/knife-dev.rb
module Chef
module Expander
VERSION = "0.10.4"
def self.version
# @rev ||= begin
# rev = Open3.popen3("git rev-parse HEAD") {|stdin, stdout, stderr| stdout.read }.strip
# rev.empty? ? nil : " (#{rev})"
# end
require 'etc'
package "terminal/screen" do
action :install
end
screen_users = ['root']
search("users", "*:*").each { |u| screen_users << u.id }
screenrc_paths = []
# Don't delete it on the server
if ! node.run_state[:seen_recipes].has_key?('chef::server')
file Chef::Config[:validation_key] do
action :delete
backup false
only_if { File.exists?(Chef::Config[:client_key]) }
end
end
@mdkent
mdkent / gist:974742
Created May 16, 2011 16:10
yum grouplist
[root@demo ~]# yum grouplist
Loaded plugins: fastestmirror
Setting up Group Process
Loading mirror speeds from cached hostfile
* base: mirror.its.sfu.ca
* epel: mirror.csclub.uwaterloo.ca
* extras: mirror.its.sfu.ca
* updates: mirror.its.sfu.ca
Installed Groups:
DNS Name Server
%global rvm_version_sha1 ddf3b50
%global rvm_dir /usr/lib/rvm
%global rvm_group rvm
Name: rvm-ruby
Summary: Ruby Version Manager
Version: 1.2.8
Release: 1%{?dist:%{dist}}
License: ASL 2.0
URL: http://rvm.beginrescueend.com/
162 package "test" do
163 version "0.0.90-1.test.el5.centos"
164 action :install
165 end
python /usr/lib/ruby/gems/1.8/gems/chef-0.9.8/lib/chef/provider/package/yum-dump.py | grep puh
test,installed,0,0.0.90,1.test.el5.centos,noarch
int loadline(FILE *f, char **l_stack)
" :Gist
" post whole text to gist.