Skip to content

Instantly share code, notes, and snippets.

it "should accept relative templatedirs" do
Puppet[:templatedir] = "my/templates"
File.expects(:directory?).with(File.join(Dir.getwd,"my/templates")).returns(true)
Puppet::Module.find_template("mytemplate").should == File.join(Dir.getwd,"my/templates/mytemplate")
end
class powerdns::mysql inherits powerdns {
package {"pdns-backend-mysql" : ensure => 'latest' }
File ["/etc/powerdns/pdns.d/pdns.local"] {
source => "puppet:///powerdns/pdns.local.mysql",
}
}
debug: rdoc: found new class powerdns::mysql
chef:/tmp# ohai
[Mon, 26 Jan 2009 01:37:35 +0000] INFO: Loading plugin os
[Mon, 26 Jan 2009 01:37:35 +0000] INFO: Loading plugin ruby
[Mon, 26 Jan 2009 01:37:35 +0000] INFO: Loading plugin languages
[Mon, 26 Jan 2009 01:37:35 +0000] INFO: Loading plugin kernel
[Mon, 26 Jan 2009 01:37:35 +0000] INFO: Loading plugin command
[Mon, 26 Jan 2009 01:37:35 +0000] INFO: Loading plugin hostname
[Mon, 26 Jan 2009 01:37:35 +0000] INFO: Loading plugin linux::hostname
/usr/lib/ruby/gems/1.8/gems/ohai-0.1.2/lib/ohai/mixin/command.rb:83:in `run_command': returned 1, expected 0 (Ohai::Exception::Exec)
from /usr/lib/ruby/gems/1.8/gems/ohai-0.1.2/lib/ohai/mixin/command.rb:67:in `chdir'
if node[:platform_version].to_f < 8.04
if File.directory?("/etc/event.d")
remote_file "/etc/event.d/runsvdir" do
describe "with a client SSL cert" do
before(:each) do
@cert = File.join(File.dirname(__FILE__), "..", "data", "client-cert.pem")
@key = File.join(File.dirname(__FILE__), "..", "data", "client-cert.key")
@c = File.read(@cert)
@k = File.read(@key)
Chef::Config[:ssl_client_cert] = @cert
Chef::Config[:ssl_client_key] = @key
File.stub!(:read).with(@cert).and_return(@c)
File.stub!(:read).with(@key).and_return(@k)
group {
use-host-decl-names on;
host lid-staging-db-1 {
hardware ethernet 00:de:ad:be:ef:00;
fixed-address 192.168.3.154;
filename "hardy-amd64/pxelinux.0";
server-name "192.168.3.1";
next-server 192.168.3.1;
}
sub vcl_fetch {
if (obj.response == 404) {
error 404
}
}
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath = $vardir/lib/facter
pluginsource = puppet:///plugins
sendmail = /usr/sbin/sendmail
[puppetd]
#!/usr/bin/ruby
#
# Joshua Sierles, 37signals, 2009
require 'rubygems'
require 'thor'
require 'chef'
require 'chef/node'
require 'chef/rest'
We couldn’t find that file to show.