Merge branch 'master' of github.com:johnbintz/puppet-standalone-mashup

This commit is contained in:
John Bintz 2012-05-16 06:44:00 -04:00
commit b70926a93c
4 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,19 @@
class varnish-debian($version, $store_file_mb => '1024') {
$varnish_user = 'varnish'
$varnish_group = 'web'
user { $varnish_user:
ensure => present,
uid => 25678,
groups => [ 'web' ],
require => Group['web']
}
class { varnish:
version => $version,
require => Package[$packages],
store_file_mb
}
}

View File

@ -0,0 +1,2 @@
VARNISH_USERNAME=<%= varnish_user %>
VARNISH_GROUP=<%= varnish_group %>

View File

@ -0,0 +1,13 @@
### BEGIN INIT INFO
# Provides: varnish
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start HTTP accelerator
# Description: This script provides a server-side cache
# to be run in front of a httpd and should
# listen on port 80 on a properly configured
# system
### END INIT INFO

View File

@ -0,0 +1,23 @@
define init_d_bundle($init_d_prolog, $init_d_prerun) {
$init_d_source = "${base::share_path}/${name}/${name}-init.d"
file { $init_d_source:
content => template("${name}/${name}-init.d"),
mode => 755
}
$init_d = "/etc/init.d/${name}"
file { $init_d:
ensure => $init_d_source,
require => File[$init_d_source]
}
update_rc_d_defaults { $name:
require => File[$init_d]
}
running_service { $name:
require => Update_rc_d_defaults[$name]
}
}