Skip to content

Instantly share code, notes, and snippets.

@dizz
dizz / gist:3143766
Created July 19, 2012 13:05
requirements
require 'rubygems'
require 'occi'
require 'open-uri'
@dizz
dizz / gist:3143767
Created July 19, 2012 13:05
read ova
ova=open 'https://raw.github.com/gwdg/rOCCI/master/spec/occi/test.ova'
@dizz
dizz / gist:3143771
Created July 19, 2012 13:05
parse ova
collection=OCCI::Parser.ova(ova.read)
jj JSON.parse(collection.to_json)
@dizz
dizz / gist:3667127
Created September 7, 2012 15:23
puppet.conf template
[main]
vardir = /var/lib/puppet
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = \$vardir/ssl
[agent]
pluginsync = true
report = true
ignoreschedules = true
@dizz
dizz / gist:3667133
Created September 7, 2012 15:23
partition table template
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/init_automatically_partition select Guided - use entire disk
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select \
Finish partitioning and write changes to disk
# d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
@dizz
dizz / gist:3667139
Created September 7, 2012 15:24
init foreman DB
# Perform initial DB setup
su - foreman -s /bin/bash -c /usr/share/foreman/extras/dbmigrate
@dizz
dizz / gist:3667147
Created September 7, 2012 15:24
restart foreman-proxy
service foreman-proxy restart
@dizz
dizz / gist:3667151
Created September 7, 2012 15:25
foreman patch
sed -i 's/if response =~ \/Could not find client certificate\//if response =~ \/Could not find client certificate\/ or $?.exitstatus == 24/' /usr/share/foreman-proxy/lib/proxy/puppetca.rb
@dizz
dizz / gist:3667152
Created September 7, 2012 15:25
foreman_url
foreman_url => 'http://foreman.cloudcomplab.ch:3000'