Skip to content

Instantly share code, notes, and snippets.

View zipkid's full-sized avatar
💭
Eating 🍪

Stefan Goethals zipkid

💭
Eating 🍪
View GitHub Profile
docker::image:
ubuntu: {}
Vagrant.configure("2") do |config|
config.vm.box = 'centos-65-x64-virtualbox-puppet'
config.vm.box_url = 'http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-puppet.box'
config.vm.synced_folder "./hiera", "/hiera"
config.vm.define :stditop do |config|
config.vm.hostname = "fqdn.com"
config.vm.network :private_network, ip: "192.168.11.171"
@zipkid
zipkid / gist:9758481
Created March 25, 2014 10:04
puppet agent -t --summarize
Notice: Finished catalog run in 7.24 seconds
Changes:
Total: 1
Events:
Success: 1
Total: 1
Resources:
Out of sync: 1
Changed: 1
Restarted: 1
vm_config.vm.provision :shell, :path => "setup.sh"
vm_config.vm.provision :puppet do |puppet|
puppet.manifests_path = "../manifests"
puppet.manifest_file = "init.pp"
puppet.module_path = "../../../modules"
puppet.options = "--verbose --debug"
puppet.facter = {
'fqdn' => fqdn,
'ipaddr' => ipaddr,
<module>::a2enmod { [mod1, mod2, mod3]: }
@zipkid
zipkid / user.rb
Last active August 29, 2015 13:57
Store fact as JSON
begin
require 'rubygems'
require 'json'
rescue LoadError => e
require File.expand_path(File.join(File.dirname(__FILE__), 'vendor'))
Vendor.load_vendored
end
users_hash = nil
puppetdb::java_args:
'-Xmx': 512m
'-Xms': '256m
@zipkid
zipkid / extra.pp
Created March 4, 2014 09:20
set puppetdb java memory
class <company>::puppetdb::server::extra (
$memory_allocation = '192m'
)
{
# Restart the PuppetDB service if settings change
Class[<company>::puppetdb::server::extra] ~> Class[puppetdb::server]
file { '/etc/sysconfig/puppetdb':
ensure => present,
content => template('mobistar/sysconfig/puppetdb.erb')
@zipkid
zipkid / namei
Created February 26, 2014 13:35
namei - follow a pathname until a terminal point is found. recursive permissions check
# namei -om /home/git/gitlab/public
f: /home/git/gitlab/public
dr-xr-xr-x root root /
drwxr-xr-x root root home
drwxrwx--x git git git
drwxrwxr-x git git gitlab
drwxrwxrwx git git public
@zipkid
zipkid / Gemfile
Created February 12, 2014 14:05 — forked from petems/Gemfile
source 'https://rubygems.org'
gem "puppet", "~> 3"
gem "highline"
gem "ruby-progressbar"
gem "rake"