aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/puppet/manifests/thin.pp5
-rw-r--r--modules/puppet/templates/config.ru16
2 files changed, 21 insertions, 0 deletions
diff --git a/modules/puppet/manifests/thin.pp b/modules/puppet/manifests/thin.pp
index 4b9ae297..8835353f 100644
--- a/modules/puppet/manifests/thin.pp
+++ b/modules/puppet/manifests/thin.pp
@@ -12,7 +12,12 @@ class puppet::thin {
content => "Listen 8140",
}
+ $service_name = 'thin_puppet_master'
file { '/etc/puppet/thin.yml':
content => template('puppet/thin.yml'),
}
+
+ file { '/usr/local/share/puppet.config.ru':
+ content => template('puppet/config.ru'),
+ }
}
diff --git a/modules/puppet/templates/config.ru b/modules/puppet/templates/config.ru
new file mode 100644
index 00000000..aba07857
--- /dev/null
+++ b/modules/puppet/templates/config.ru
@@ -0,0 +1,16 @@
+# a config.ru, for use with every rack-compatible webserver.
+# SSL needs to be handled outside this, though.
+
+# if puppet is not in your RUBYLIB:
+# $:.unshift('/opt/puppet/lib')
+
+$0 = '<%= service_name %>'
+
+# if you want debugging:
+# ARGV << "--debug"
+
+ARGV << "--rack"
+require 'puppet/application/master'
+# we're usually running inside a Rack::Builder.new {} block,
+# therefore we need to call run *here*.
+run Puppet::Application[:master].run