This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sources.list | |
deb http://za.archive.ubuntu.com/ubuntu/ jaunty main restricted | |
deb-src http://za.archive.ubuntu.com/ubuntu/ jaunty main restricted | |
deb http://security.ubuntu.com/ubuntu jaunty-security main restricted | |
deb-src http://security.ubuntu.com/ubuntu jaunty-security main restricted | |
deb http://za.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted | |
deb-src http://za.archive.ubuntu.com/ubuntu/ jaunty-updates main restricted | |
deb http://za.archive.ubuntu.com/ubuntu/ jaunty universe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# muppet/app/models/log.rb: | |
class Log < ActiveRecord::Base | |
belongs_to :report | |
end | |
# muppet/app/models/report.rb: | |
class Report < ActiveRecord::Base | |
belongs_to :host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This fix should only be applied to FastCGI-enabled hosts, because our | |
# FastCGI implementation provides per-user session directories, which | |
# get around the strict permissions problem that had Debian disable | |
# session garbage collection in the first place. | |
class php_session_gc_fix { | |
file { | |
"/etc/php4/conf.d/session_gc_fix.ini": | |
ensure => $fastcgi == ? { | |
1 => file, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This fix should only be applied to FastCGI-enabled hosts, because our | |
# FastCGI implementation provides per-user session directories, which | |
# get around the strict permissions problem that had Debian disable | |
# session garbage collection in the first place. | |
class php_session_gc_fix { | |
file { | |
["/etc/php4/conf.d/session_gc_fix.ini", "/etc/php5/conf.d/session_gc_fix.ini"]: | |
ensure => $fastcgi == ? { | |
1 => file, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This fix should only be applied to FastCGI-enabled hosts, because our | |
# FastCGI implementation provides per-user session directories, which | |
# get around the strict permissions problem that had Debian disable | |
# session garbage collection in the first place. | |
class php_session_gc_fix { | |
file { | |
["/etc/php4/conf.d/session_gc_fix.ini", "/etc/php5/conf.d/session_gc_fix.ini"]: | |
ensure => $fastcgi ? { | |
1 => file, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[4, 5].each do |version| | |
fact = "php#{version}_extensions".to_sym | |
Facter.add(fact) do | |
setcode do | |
extensions = [] | |
IO.popen("php#{version} -i").each do |line| | |
line.chomp! | |
line.gsub!(/^ionCube Loader$/, "ioncube") | |
line.gsub!(/^Zend Optimizer$/, "zend_optimizer") | |
if line =~ /^[a-z0-9_]+$/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hos_server(host, attr) | |
value = nil | |
server_block = nil | |
File.open("/etc/hos_server").each do |line| | |
line.chomp! | |
if line =~ /^server:\s+(\S+)\s+\{\s*$/ | |
if host == $1 | |
server_block = host | |
else | |
server_block = nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node default { | |
include a_bunch_of_stuff | |
# ... | |
case $fqdn { | |
'wombat3.cpt1.example.com', | |
'wombat3.cpt2.example.com', | |
'wombat2.jnb1.example.com', | |
'wombat2.jnb2.example.com', | |
'wombat3.nur4.example.com', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# manifests/classes/puppetmaster.rb | |
class puppetmaster { | |
$branch = $fqdn ? { | |
'puppet1.hetzner.africa' => 'trunk', | |
default => 'branches/production', | |
} | |
cron { puppetmaster_clean_reports: | |
ensure => absent, | |
user => puppet, |