Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
########################################
# create the first spacewalk account
# satwho requires it
LANG=C
tempfile=$(mktemp /tmp/$(basename $0).XXXXXX)
@vinzent
vinzent / nvidia_driver_install.pp
Last active January 22, 2016 09:12
Referencing hash values within module
# https://groups.google.com/forum/#!topic/puppet-users/1ol4b1euTiE
class nvidia::driver_install (
include stdlib
$model_hash = {
009d => "$::nvidia::params::quadro_fx_4500_driver",
06dc => "$::nvidia::params::quadro_6000_driver",
06d9 => "$::nvidia::params::quadro_5000_driver",
11ba => "$::nvidia::params::quadro_K5000_driver",
17c2 => "$::nvidia::params::gtx_titanx_driver",
@vinzent
vinzent / test_spec.rb
Last active September 21, 2015 07:38
# all checks will "fail", but check date output
#
# fails with: rspec test_spec.rb </dev/null
# works with: rspec test_spec.rb
require 'serverspec'
set :backend, :exec
describe 'test' do
@vinzent
vinzent / puppetserver-create-gem-rpm
Created June 10, 2015 09:14
puppetserver-create-gem-rpm
#!/bin/bash
# Author: Thomas Mueller <thomas@chaschperli.ch>
# Date: 2015-06-10
# enable to exit on first error
# set -e
# list gem's to create rpm's seperated by space
# example for 2 gems: gem_list="r10k trocla"
@vinzent
vinzent / puppet-agent-create-gem-rpm
Created June 5, 2015 07:18
Howto: easily create rpms from ruby gems for use with puppet-agent AIO
#!/bin/bash
# Author: Thomas Mueller <thomas@chaschperli.ch>
# Date: 2015-06-05
# enable to exit on first error
# set -e
# list gem's to create rpm's seperated by space
# example for 2 gems: gem_list="r10k trocla"
@vinzent
vinzent / gist:f4b39419254529d75936
Created January 7, 2015 13:35
apache http https redirect vhost conf
<VirtualHost *:80>
ServerName phabricator.my.domain
## Vhost docroot
DocumentRoot "/opt/phacility/phabricator/webroot"
<Directory "/opt/phacility/phabricator/webroot">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
@vinzent
vinzent / local_puppet_passenger.te
Last active August 29, 2015 14:08
SELinux, Puppet (PupetLabs Open-Source) and Passenger (EPEL) on RHEL6
# Environment: RHEL6 with Passenger from EPEL and Puppet Open-source from yum.puppetlabs.com
# Howto compile:
# yum install checkpolicy
# checkmodule -M -m -o local_puppet_passenger.mod local_puppet_passenger.te &&
# semodule_package -o local_puppet_passenger.pp -m local_puppet_passenger.mod &&
# semodule --install local_puppet_passenger.pp
module local_puppet_passenger 2.17;