This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
knife "$@" -c ~/.chef/knife-dev.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'etc' | |
package "terminal/screen" do | |
action :install | |
end | |
screen_users = ['root'] | |
search("users", "*:*").each { |u| screen_users << u.id } | |
screenrc_paths = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int loadline(FILE *f, char **l_stack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" :Gist | |
" post whole text to gist. |