Skip to content

Instantly share code, notes, and snippets.

@treydock
treydock / Vagrantfile
Last active December 20, 2015 14:09
Vagrantfile for ZFS on Linux testing
# -*- mode: ruby -*-
# vi: set ft=ruby :
# References
# [1] - https://github.com/treydock/puppet-zfsonlinux/tree/development_zpool_type
module LocalHelper
def self.home
File.expand_path('~')
end
@treydock
treydock / gist:5832658
Created June 21, 2013 17:00
Basic Vagrantfile for developing Puppet modules.
# -*- mode: ruby -*-
# vi: set ft=ruby :
def home
File.expand_path('~')
end
# Define 10GB disks to attach to VM
def extra_disks
[
@treydock
treydock / mock_uname.sh
Created October 24, 2012 15:39
Find current kernel version in mock environment
#!/bin/bash
ARCH=$(uname -m)
[ "$ARCH" == "x86_64" ] && INV_ARCH="i686" || INV_ARCH="x86_64"
KERNEL=$(uname -r)
echo $KERNEL | grep -q $ARCH
[ $? -ne 0 ] && echo ${KERNEL//$INV_ARCH/$ARCH} || echo $KERNEL
@treydock
treydock / foreman_extlookup.rb
Created August 20, 2012 23:23
Test output of Foreman extlookup for Puppet module integration
#!/usr/bin/env ruby
##
# == Usage
#
# Perform hostgroup search for host 'host1.tld'
# +ruby foreman_extlookup.rb https://foreman-server.tld -i hostgroups -s "host = host1.tld" -u lookup -p Password1+
#
# Perform hostgroup search for host 'host1.tld' without providing password, will be prompted for password
# +ruby foreman_extlookup.rb https://foreman-server.tld -i hostgroups -s "host = host1.tld" -u lookup -p+
@treydock
treydock / preflight.py
Created March 9, 2012 01:19
Preflight for Munki using Munkiserver
#!/usr/bin/python
import sys
import os
import subprocess
from munkilib import fetch
from munkilib import FoundationPlist
#Dynamic Config Munki Preflight Script by John Rozewicki
#2010-12-08
#