Skip to content

Instantly share code, notes, and snippets.

View timusg's full-sized avatar
🎯
Focusing

sumit gupta timusg

🎯
Focusing
View GitHub Profile
@timusg
timusg / Dockerfile
Last active December 25, 2015 09:39 — forked from paulczar/Dockerfile
# Chef-Zero
#
# VERSION 0.0.1
FROM base
MAINTAINER Paul Czarkowski "username.taken@gmail.com"
RUN apt-get update
RUN apt-get install -y ruby1.9.1-dev build-essential
#!/usr/bin/env 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: