Skip to content

Instantly share code, notes, and snippets.

View filler's full-sized avatar

Nick Silkey filler

View GitHub Profile
@jtimberman
jtimberman / gist:639638
Created October 21, 2010 23:56 — forked from btm/gist:639581
different ways to get interface IPs
$ grep 'node\[:network\]\[:interfaces\].' \#chef.log
10:15 < mkent_> node[:network][:interfaces][:eth1][:addresses]
22:24 <+Damm> msf, just pulling in the node[:network][:interfaces] attributes
20:44 < randybias> node[:network][:interfaces][:eth0][:addresses]
09:13 < sinBot> so fujin if I wanted to use that in an erb template, it'd be <%= @node[:network][:interfaces]["en1"]["addresses"].select{address}.flatten.to_str %> ?
12:27 < cwj> if i have an ipv4 ip address set on eth0, will it always be in @node[:network][:interfaces][:eth0][1] ?
02:19 < pluesch0r> however, i don't seem to be able to access @node[:network][:interfaces]... from inside the attributes file.
19:52 <@jtimberman> or node[:network][:interfaces][:eth0][:addresses][0]
20:09 < seryl> well, it's searchable. I'm trying the @node[:network][:interfaces][:eth0][:addresses][0] route, but getting blanks right now, playing around with it in chef solo
20:29 < kallistec> pp node[:network][:interfaces].current_attribute
@schisamo
schisamo / definition.rb
Created January 4, 2011 20:50
veewee definition for creating a Vagrant box that mirrors the centos5-gems knife bootstrap template
Veewee::Session.declare( {
:cpu_count => '1',
:memory_size=> '384',
:disk_size => '10140',
:disk_format => 'VDI',
:disk_size => '10240' ,
:os_type_id => 'RedHat',
:iso_file => "CentOS-5.5-i386-netinstall.iso",
:iso_src => "http://mirror.bytemark.co.uk/centos/5.5/isos/i386/CentOS-5.5-i386-netinstall.iso",
:iso_md5 => "0172883a3039772165db073693debae5",
@adamgoucher
adamgoucher / promises.cf
Created February 7, 2012 16:17
how to use selenium and pear with cfengine
body common control
{
bundlesequence => { "packages", "channels", "prickly" };
}
#http://cfengine.com/manuals/CfengineStdLibrary.html#body-package_005fmethod-yum
body package_method yum
{
package_changes => "bulk";
package_list_command => "/usr/bin/yum list installed";
@everpeace
everpeace / gitsshm
Created May 15, 2012 14:16
GIT_SSH manager for github.
#!/bin/bash
if [ -z $GITHUB_KEYS_DIR ]; then
GITHUB_KEYS_DIR="$HOME/github-keys"
fi
if [ -z $GITHUB_KEY_FILE_NAME ]; then
GITHUB_KEY_FILE_NAME="id_rsa"
fi