Skip to content

Instantly share code, notes, and snippets.

View clifferson's full-sized avatar

Cliff Erson clifferson

  • Riot Games
  • Las Vegas
View GitHub Profile
@jtimberman
jtimberman / spec.rb
Last active December 10, 2015 02:48
Starting to add rspec tests for runit_service LWRP.
champagne:~OPSCODE_COOKBOOKS/runit (1.9.3-p327)
CHEF-154 ✗ % rake spec
bundle exec rspec -c -f d spec.rb
Chef::Provider::RunitService
load_current_resource
should create a current resource with the name of the new resource
Finished in 0.00362 seconds
1 example, 0 failures
@jtimberman
jtimberman / rename-node.rb
Created March 2, 2012 07:47 — forked from mpasternacki/rename-node.rb
A knife exec script to change Chef node's name.
#!./bin/knife exec
# A knife exec script to change chef node's name, preserving all the attributes.
#
# Usage: knife exec rename-node.rb old-name new-name
#
# Script retrieves the Node object, changes its 'name' attribute,
# creates new Node object with updated name and rest of attributes
# untouched. Then it deletes old Node and Client objects from
# database, and logs into the server to update it: