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
raise "Sorry, man, you're not allowed to run." |
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
onfig_dir = File.dirname(__FILE__) | |
cookbook_dir = File.join(config_dir, ".." ,"cookbooks") | |
organization = File.basename(File.expand_path(File.join(File.dirname(__FILE__), ".."))) | |
log_level :info | |
log_location STDOUT | |
node_name 'adam' | |
client_key "#{config_dir}/adam.pem" | |
chef_server_url "https://api.opscode.us/organizations/#{organization}" | |
cache_type 'BasicFile' |
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
[adam@latte](master*)% knife data bag show users adam | |
{ | |
"groups": "sysadmin", | |
"comment": "Adam Jacob", | |
"ssh_keys": "...", | |
"files": { | |
".zshrc": { | |
"mode": "0644", | |
"source": "dot-zshrc" | |
}, |
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
# which goes first!? | |
template "/etc/init.d/reflex" do | |
source "reflex.init.erb" | |
owner "root" | |
group "root" | |
mode "644" | |
end | |
service "reflex" do |
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
Given /^an? '(.+)' named '(.+)' exists$/ do |stash_name, stash_key| | |
http_method = "post" | |
case stash_name | |
when "registration" | |
r = Chef::REST.new("http://localhost/organizations/clownco", 'clownco-validator', "#{tmpdir}/validation.pem") | |
r.register("bobo", "#{tmpdir}/bobo.pem") | |
# set default rest client to the registration |
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
chef > node.set[:foo] = [{}, {}] | |
=> [{}, {}] | |
chef > node[:foo].each { |f| f[:name] = 3 } | |
=> [{"name"=>3}, {"name"=>3}] | |
chef > node.foo | |
=> [{"name"=>3}, {"name"=>3}] | |
chef > node[:foo] | |
=> [{"name"=>3}, {"name"=>3}] | |
chef > recipe | |
chef:recipe > node[:foo] |
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
set[:foo] = [{},{}] | |
foo.each do |foo| | |
foo[:name] = 3 | |
end | |
set[:foo] = [{},{}] | |
foo.each do |thing| | |
thing[:name] = 3 | |
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
Chef::Platform.name_packages do | |
package("sudo").on(:gentoo).is("app-admin/sudo") | |
package("foo-dev") do | |
on(:redhat, :centos).is("foo-devel") | |
end | |
end | |
package "sudo" do | |
on(:gentoo) do | |
name "foo" |
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
@user_object_id = if id_type == 'auth' && !config[:object_id].nil? | |
user_object_id = auth_id_to_user_id(config[:object_id]) | |
STDERR.puts "user object id: #{user_object_id}" | |
user_object_id | |
else | |
config[:object_id] || if user_object_type && object_name | |
user_object_id = object_id_from_name_and_type(object_name,user_object_type) | |
user_object_id | |
else | |
nil |
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/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb | |
index 50a7f12..04a2ad5 100644 | |
--- a/app/views/layouts/application.html.erb | |
+++ b/app/views/layouts/application.html.erb | |
@@ -193,7 +193,7 @@ | |
<!-- End Google Analytics --> | |
<!-- Begin Chartbeat Part 2 (goes right before the closing body tag) --> | |
- <script type="text/javascript"> var _sf_async_config={uid:2072,domain:"cookbooks.opscode.com"}; (function(){ function loadChartbeat() { window._sf_endpt=(new Date()).getTime(); var e = document.creat | |
+ <script type="text/javascript"> var _sf_async_config={uid:2072,domain:"cookbooks.opscode.com"}; (function(){ function loadChartbeat() { window._sf_endpt=(new Date()).getTime(); var e = document.creat |
NewerOlder