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
# In Chef, when a resource is defined all its variables are evaluated during | |
# compile time and the execution of the resource takes place in converge phase. | |
# So if the value of a particular attribute is changed in converge | |
# (and not in compile) the resource will be executed with the old value. | |
# Example problem: | |
# Let's consider this situation where there are two steps involved in a recipe | |
# Step 1 is a Ruby block that changes a node attribute. Rubyblocks get executed | |
# in converge phase | |
# Step 2 is a Chef resource that makes use of the node attribute that was |
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
#include "stdio.h" | |
main() | |
{ | |
int a,b,c; | |
int count = 1; | |
for (b = c = 10; | |
a = "- FIGURE?, UMKC,XYZHello Folks,\ | |
TFy!QJu ROo TNn(ROo)SLq SLq ULo+\ |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'json' | |
if ARGV.size != 1 | |
puts "This script only accepts a single parameter as organization." | |
puts "Usage: #{__FILE__.split("/").last} <organization>" | |
exit 1 | |
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
#!/usr/bin/env ruby | |
require "rubygems" | |
require "json" | |
if ARGV.size < 1 | |
puts "Please provide a JSON file" | |
exit 1 | |
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
class Chef | |
class Log | |
def self.warn(str); end | |
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
kitchen | [default] Setting the name of the VM... | |
kitchen | [default] Clearing any previously set forwarded ports... | |
kitchen | [default] Clearing any previously set network interfaces... | |
kitchen | [default] Preparing network interfaces based on configuration... | |
kitchen | [default] Forwarding ports... | |
kitchen | [default] -- 22 => 2222 (adapter 1) | |
kitchen | [default] Running 'pre-boot' VM customizations... | |
kitchen | [default] Booting VM... | |
kitchen | [default] Waiting for machine to boot. This may take a few minutes... | |
kitchen | [default] Machine booted and ready! |
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
provisioner: | |
solo_rb: | |
log_level: warn |
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
# attributes | |
default['cron']['service_name'] = 'cron' | |
# recipe | |
include_recipe 'chef_handler' | |
cookbook_file "#{node['chef_handler']['handler_path']}/blah.rb" do | |
source 'blah.rb' | |
action :create | |
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
# This simlpe snippet explains how to swap the repository of all the cookbooks under | |
# a RightScale ServerTemplate | |
require 'right_api_client' | |
# Initialize the client with correct options. | |
client = RightApi::Client.new(options) | |
# Obtain the servertemplate resource where you want to swap the respository | |
st = client.server_templates.index(id: 123456) |
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
/*- | |
* Copyright (c) 2001, 2002 Mike Barcroft <[email protected]> | |
* Copyright (c) 2001 The NetBSD Foundation, Inc. | |
* All rights reserved. | |
* | |
* This code is derived from software contributed to The NetBSD Foundation | |
* by Klaus Klein. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions |
OlderNewer