This file contains hidden or 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
> result = shell_out!('ps | grep hogehgoe') | |
Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1' | |
---- Begin output of ps | grep hogehgoe ---- | |
STDOUT: | |
STDERR: | |
---- End output of ps | grep hogehgoe ---- | |
Ran ps | grep hogehgoe returned 1 | |
from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:251:in `invalid!' |
This file contains hidden or 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
apt-get -y update | |
apt-get -y install debconf-utils | |
cat <<EOL | debconf-set-selections | |
grub-pc grub-pc/install_devices multiselect /dev/vda | |
grub-pc grub-pc/install_devices_empty boolean false | |
EOL | |
apt-get -y upgrade |
This file contains hidden or 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
task :default => 'upload' | |
$stdin.sync = true | |
desc 'upload chef-repos to chefzero vm' | |
task :upload do | |
system('knife cookbook upload --all') | |
system('knife upload environments/ ') | |
system('knife upload roles/ ') | |
end |
This file contains hidden or 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
diff --git a/config/action.d/ipfilter.conf b/config/action.d/ipfilter.conf | |
index 61420e3..091c92d 100644 | |
--- a/config/action.d/ipfilter.conf | |
+++ b/config/action.d/ipfilter.conf | |
@@ -13,14 +13,14 @@ | |
# Values: CMD | |
# | |
# enable IPF if not already enabled | |
-actionstart = /sbin/ipf -E | |
+actionstart = /usr/sbin/ipf -E |
This file contains hidden or 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 'settingslogic' | |
class EnvSettings < Settingslogic | |
source File.expand_path('../config.yml', __FILE__) | |
end | |
if File.exist?(File.expand_path('../config.local.yml', __FILE__)) | |
class EnvLocalSettings < Settingslogic | |
source File.expand_path('../config.local.yml', __FILE__) | |
end |
This file contains hidden or 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
rvm: | |
- 2.0.0 | |
- 1.9.3 |
This file contains hidden or 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
script: "./test.sh" |
This file contains hidden or 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
curl -s -f -L -u 'LOGIN_NAME/token:API_TOKEN' https://raw.github.com/ORG_NAME/REPO_NAME/master/README.md |
This file contains hidden or 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 'syslog-logger' | |
Logger::Syslog.class_eval do | |
attr_accessor :sync, :formatter, :close | |
def write(msg) | |
data = msg.match(/(\[.+?\]) ([\w]+):(.*)$/) | |
self.send(data[2].downcase.to_sym, data[3]) | |
end | |
end |
This file contains hidden or 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
class Chef::EventDispatch::Irchandler | |
require 'carrier-pigeon' | |
def initialize | |
@ohai = Ohai::System.new | |
@ohai._require_plugin('os') | |
@ohai._require_plugin('hostname') | |
end | |
def method_missing(*args) | |
line = [@ohai.fqdn, args].flatten.join(':') |