Skip to content

Instantly share code, notes, and snippets.

View jessereynolds's full-sized avatar

Jesse Reynolds jessereynolds

  • Puppet
  • Melbourne, Victoria, Australia
View GitHub Profile
@jessereynolds
jessereynolds / download_pe.sh
Last active March 30, 2020 05:42
Puppet Enterprise download script
#!/bin/bash
# find the latest version here: https://puppet.com/misc/version-history
# release notes: https://puppet.com/docs/pe/latest/release_notes_pe.html
# this script: https://gist.github.com/jessereynolds/750bd4394c42f3ab06dad35a95793073
#version="2019.5.0"
version="latest"
#dist="ubuntu"
Puppet::Parser::Functions.newfunction(:local_scope,
:type => :rvalue,
:doc => <<-'EOS'
Generates the local scope as a hash. This allows you to use epp functions more
or less like erb templates by passing local scope as the parameters argument.
e.g., `content => epp('mymodname/template.epp', local_scope() )`
EOS
) do |args|
scope = self.to_hash
scope.reject! { |key,val| scope['facts'].include? key }
@natemccurdy
natemccurdy / windows_dev_node.pp
Last active March 8, 2017 00:09
Bootstrap to make editing code on Windows better
# GETTING STARTED
# 1. Install the Puppet agent from http://downloads.puppetlabs.com/windows/puppet-agent-1.3.6-x64.msi
# 2. puppet module install chocolatey-chocolatey
# 3. puppet module install cyberious-apm
# 4. puppet apply windows_dev_node.pp
include chocolatey
$choco_packages = [
'git',
@tobstarr
tobstarr / Dockerfile
Last active December 20, 2015 14:29
Dockerfile for running OpenTSDB
FROM ubuntu
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y curl build-essential git-core
RUN if [ ! $(grep universe /etc/apt/sources.list) ]; then sed 's/main$/main universe/' -i /etc/apt/sources.list && apt-get update; fi
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-6-jdk
RUN mkdir -p /opt/downloads && cd /opt/downloads && curl -SsfLO "http://www.apache.org/dist/hbase/hbase-0.94.10/hbase-0.94.10.tar.gz"
RUN cd /opt && tar xvfz /opt/downloads/hbase-0.94.10.tar.gz
RUN mkdir -p /data/hbase
RUN mkdir -p /root/.profile.d
RUN mkdir -p /root && echo Zm9yIHByb2ZpbGVfcGF0aCBpbiAkKGZpbmQgL3Jvb3QvLnByb2ZpbGUuZC8gLXR5cGUgZik7IGRvIHNvdXJjZSAkcHJvZmlsZV9wYXRoOyBkb25lCg== | base64 -d > /tmp/wunderscale.e4e4b9a9fbb0a7813a4707407606ccb195999effc1d27eac75a879113a4a017b && mv /tmp/wunderscale.e4e4b9a9fbb0a7813a4707407606ccb195999effc1d27eac75a879113a4a017b /root/.profile
RUN mkdir -p /root/.profile.d && echo ZXhwb3J0IEpBVkFfSE9NRT0vdXNyL2xpYi9qdm0vamF2YS02LW9wZW5qZGstYW1kNjQK | base64 -d > /tmp/wundersc
@aussielunix
aussielunix / linux_proc_name.rb
Created November 22, 2011 11:39 — forked from eric/linux_proc_name.rb
Update a process name in linux to change how it shows up in top and lsof
#
# Eric Lindvall <eric@5stops.com>
#
# Update the process name for the process you're running in.
#
# This will allow top, lsof, and killall to see the process as the
# name you specify.
#
# Just use:
#
@jedi4ever
jedi4ever / solaris ai manifest - default.xml
Created May 3, 2011 07:51
solaris 11 - express - i386 - ruby - gcc - chef - puppet - virtualbox - vagrant
falcon-pdb:veewee patrick$ vagrant basebox build mysolaris --force
Verifying the isofile sol-11-exp-201011-ai-x86.iso is ok.
Forcing build by destroying mysolaris machine
VBoxManage unregistervm 'mysolaris' --delete
Deleting vm mysolaris
Creating vm mysolaris : 768M - 1 CPU - OpenSolaris
Creating new harddrive of size 15140
VBoxManage createhd --filename '/Users/patrick/VirtualBox VMs/mysolaris/mysolaris.vdi' --size '15140' --format vdi > /dev/null
Attaching disk: /Users/patrick/VirtualBox VMs/mysolaris/mysolaris.vdi
@freeformz
freeformz / collectd-configure-vmware.patch
Created November 24, 2010 01:30
vmware client sdk plugin for collectd. Against collect 4.7.4
--- configure.in
+++ configure.in
@@ -3337,6 +3337,7 @@
dependency_warning="no"
dependency_error="no"
+plugin_vmware="yes"
plugin_ascent="no"
plugin_battery="no"
plugin_bind="no"