Skip to content

Instantly share code, notes, and snippets.

@arangamani
arangamani / rs_swap_repo.rb
Last active August 29, 2015 13:58
Swapping repositories on RightScale ServerTemplate cookbooks
# 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)
@rottenbytes
rottenbytes / pkgng.rb
Created September 5, 2012 08:29
chef+pkgng
require 'chef/mixin/shell_out'
require 'chef/platform'
require 'chef'
include Chef::Mixin::ShellOut
class Chef
class Provider
class Package
class Pkgng < Chef::Provider::Package