Skip to content

Instantly share code, notes, and snippets.

View jeffmccune's full-sized avatar

Jeff McCune jeffmccune

View GitHub Profile
# The configuration file for apply. Note that this file
# is likely to have unused configuration parameters in it; any parameter that's
# valid anywhere in Puppet can be in any config file, even if it's not used.
#
# Every section can specify three special parameters: owner, group, and mode.
# These parameters affect the required permissions of any files specified after
# their specification. Puppet will sometimes use these parameters to check its
# own configured state, so they can be used to make Puppet a bit more self-managing.
#
# Generated on Wed May 25 13:17:34 -0700 2011.
➜  puppet  puppet apply -v --modulepath /Users/jeff/src/manifests/modules{,/paramstest/tests/site.pp}
info: Applying configuration version '1308091819'
notice:  param=[I'm defined in paramstest::params] mandatory=[site.pp]
notice: /Stage[main]/Paramstest/Notify[TEST]/message: defined 'message' as ' param=[I'm defined in paramstest::params] mandatory=[site.pp]'
➜  puppet  git describe                                                                              
2.6.3
@jeffmccune
jeffmccune / screenrc
Created September 8, 2011 17:14
GNU Screen RC
defutf8 on
defflow off
vbell off
autodetach on
startup_message off
defscrollback 30000
# The hard status is updated by the zsh prompt commands.
# %t is populated by the shell sending 'print -nR $'\033k'$1$'\033'\\'
# %h is populated by the shell sending 'print -nR $'\033]0;'$2$'\a''
@jeffmccune
jeffmccune / find_template_by_instance_uuid.rb.diff
Created September 8, 2011 20:44
rbvmomi responses versus Excon responses
# What I'm doing to convert #
diff --git a/lib/fog/vsphere/requests/compute/find_template_by_instance_uuid.rb b/lib/fog/vsphere/requests/compute/find_template_by_instance_uuid.rb
index 3a1776b..21c289a 100644
--- a/lib/fog/vsphere/requests/compute/find_template_by_instance_uuid.rb
+++ b/lib/fog/vsphere/requests/compute/find_template_by_instance_uuid.rb
@@ -1,27 +1,35 @@
module Fog
module Compute
@jeffmccune
jeffmccune / gist:1223382
Created September 16, 2011 23:12
List AWS Key Names
[jeff@light] 1.8.7@ckcp ~ 1 ↵
% puppet node_aws create --image ami-2342a94a --keyname jeffdne --type t1.micro
err: Unrecognized key name: jeffdne (Suggestion: use the puppet node_aws list_keynames action to find a list of valid key names for your account.)
err: Try 'puppet help node_aws create' for usage
[jeff@light] 1.8.7@ckcp ~ 1 ↵
% puppet node_aws list_keynames
asdf
awsCFtest
cody
jeff
@jeffmccune
jeffmccune / gist:1310371
Created October 24, 2011 21:29
Incrementing environment variables

The test Script

#! /bin/bash
set -x
set -e
set -u
idx=0
((idx++))
echo "rval: $?"

echo "idx: $idx"

@jeffmccune
jeffmccune / gist:1335043
Created November 2, 2011 21:52
Puppet Laptop Environment

rspec run

[jeff@maynard] (master)(clean) 1.8.7@ckcp /vagrant/modules/cloud-provisioner 
% rspec spec/**/*_spec.rb

RVM

% rvm current
ruby-1.8.7-p334@ckcp
@jeffmccune
jeffmccune / .fog
Created November 14, 2011 17:23
Fog YAML Configuration for PE 2.0
:default:
:vsphere_server: vc01.puppetlabs.lan
:vsphere_username: jeffapi
:vsphere_password: abc123
:vsphere_expected_pubkey_hash: 431dd5d0412aab11b14178290d9fcc5acb041d37f90f36f888de0cebfffff0a8
:aws_access_key_id: AKIAIISJV5TZ3FPWU3TA
:aws_secret_access_key: XXXXXXXXXXXXXXXXXXXXXXXX
@jeffmccune
jeffmccune / gist:1411574
Created November 30, 2011 22:49
Puppet Gemset
[jeff@maynard] 1.8.7 ~
% rvm gemset use puppet
[jeff@maynard] 1.8.7@puppet ~
% gem list
albino (1.3.3)
blockenspiel (0.4.2)
builder (3.0.0)
CFPropertyList (2.0.17)
columnize (0.3.2)
configuration (1.2.0)
@jeffmccune
jeffmccune / repair_mac_ruby_links.sh
Created December 1, 2011 17:26
Repair Mac OS X Ruby Symlinks