Merge branch 'master' of github.com:johnbintz/puppet-standalone-mashup
This commit is contained in:
commit
b70926a93c
19
shared/additional-modules/varnish-debian/manifests/init.pp
Normal file
19
shared/additional-modules/varnish-debian/manifests/init.pp
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
|||||||
|
VARNISH_USERNAME=<%= varnish_user %>
|
||||||
|
VARNISH_GROUP=<%= varnish_group %>
|
@ -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
|
||||||
|
|
23
shared/modules/init_d_bundle/manifests/init.pp
Normal file
23
shared/modules/init_d_bundle/manifests/init.pp
Normal 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]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user