Skip to content

Instantly share code, notes, and snippets.

View ghoneycutt's full-sized avatar

Garrett Honeycutt ghoneycutt

View GitHub Profile
# This is the default auth.conf file, which implements the default rules
# used by the puppet master. (That is, the rules below will still apply
# even if this file is deleted.)
#
# The ACLs are evaluated in top-down order. More specific stanzas should
# be towards the top of the file and more general ones at the bottom;
# otherwise, the general rules may "steal" requests that should be
# governed by the specific rules.
#
# See http://docs.puppetlabs.com/guides/rest_auth_conf.html for a more complete
@ghoneycutt
ghoneycutt / gist:4fcc0c4a3edf9bd3b570
Last active August 29, 2015 14:05
hiera config for puppet master and dashboard
---
classes:
- puppet::master
- puppet::dashboard::server
passenger::params::passenger_version: '3.0.21'
# This should only be true for puppet masters. At a less specific point in the
# hierarchy set this value to 'false' for every other type of system.
puppet::agent::is_puppet_master: 'true'
Facter.add("php_version") do
setcode do
test_exists = "which php 2>&1 >/dev/null ; echo $?"
if Facter::Util::Resolution.exec(test_exists) == '0'
php_output = Facter::Util::Resolution.exec('php --version')
php_output.split[1]
end
end
end
#!/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
#
@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}
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
export SPEC_OPTS="--format documentation"
# 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)
@ghoneycutt
ghoneycutt / demo.yaml
Last active December 23, 2015 11:18
[Puppet Users] Array being flattened
---
amanda::disklist:
'/var':
configs: demo
dumptype: dumptype
@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",
# Define filebucket 'main':
filebucket { 'main':
server => 'puppet.example.com',
path => false,
}
# Ignoring version control artifacts
File {
backup => 'main',
ignore => [ '.svn',