Skip to content

Instantly share code, notes, and snippets.

View ghoneycutt's full-sized avatar

Garrett Honeycutt ghoneycutt

View GitHub Profile
@ghoneycutt
ghoneycutt / hosts.md
Created May 2, 2018 21:13
default /etc/hosts

macos

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1	localhost
@ghoneycutt
ghoneycutt / sensu-client.pp
Created November 27, 2017 02:19
Puppet code snippet to be used on any system acting as a sensu client
# If using a multihomed system, you may need to change the interface
$ip = $facts['networking']['interfaces']['eth1']['ip']
class { '::sensu':
rabbitmq_password => 'correct-horse-battery-staple',
rabbitmq_host => '192.168.56.10',
rabbitmq_vhost => '/sensu',
subscriptions => 'all',
client_address => $ip,
}
@ghoneycutt
ghoneycutt / site.pp
Created November 27, 2017 01:48
Puppet site manifest for Sensu server
# /etc/puppetlabs/code/environments/development/manifests/site.pp
# replace `sensu-server.example.com` with the FQDN of the system.
node 'sensu-server.example.com' {
## Begin dependencies for Sensu server
require ::epel
$dependencies = [
'nagios-plugins-ntp', # Not strictly needed. Used to demo a check.
# Define filebucket 'main':
filebucket { 'main':
server => 'puppet.example.com',
path => false,
}
# Ignoring version control artifacts
File {
backup => 'main',
ignore => [ '.svn',
@ghoneycutt
ghoneycutt / gist:7356695
Created November 7, 2013 15:41
Puppetfile
mod "apache",
:git => "git://github.com/ghoneycutt/puppetlabs-apache.git",
:ref => "manage_firewall_stop_purging_httpd_vdir"
mod "apt",
:git => "git://github.com/puppetlabs/puppetlabs-apt.git",
:ref => "1.1.0"
mod "common",
:git => "git://github.com/ghoneycutt/puppet-module-common.git",
@ghoneycutt
ghoneycutt / demo.yaml
Last active December 23, 2015 11:18
[Puppet Users] Array being flattened
---
amanda::disklist:
'/var':
configs: demo
dumptype: dumptype
# Configuration file for varnish
#
# /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this
# shell script fragment.
#
# Maximum number of open files (for ulimit -n)
NFILES=131072
# Locked shared memory (for ulimit -l)
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
export SPEC_OPTS="--format documentation"
@ghoneycutt
ghoneycutt / gist:5b6034f9bb381c56a950
Created March 19, 2015 14:24
basic starter hiera.yaml configuration
---
:backends:
- eyaml
- yaml
:hierarchy:
- fqdn/%{fqdn}
- roles/%{role}
- environments/%{environment}
- osfamily/%{osfamily}-%{lsbmajdistrelease}
- osfamily/%{osfamily}
#!/bin/bash
#
# License: GPLv2
#
# Quick and dirty shell script for taking a file with one package per line and
# turning that into valid YAML to use in conjunction with puppet-module-types
# and Hiera.
#
# Given a file, 'package_list' with contents
#