rearrange a ton of things
This commit is contained in:
parent
eccb9e1cee
commit
5f5731868f
@ -1,5 +1,10 @@
|
||||
class basics {
|
||||
$packages = [ "ntp", "ntpdate", "gcc", "curl", "build-essential", "patch", 'sysstat', 'git-core', 'vim' ]
|
||||
$packages = [
|
||||
"ntp", "ntpdate", "gcc", "curl",
|
||||
"build-essential", "patch", 'sysstat',
|
||||
'git-core', 'vim'
|
||||
]
|
||||
|
||||
package { $packages: ensure => installed }
|
||||
|
||||
bash_rc { "/etc/bash.bashrc": ensure => present }
|
||||
|
@ -1,6 +1,6 @@
|
||||
class varnish::debian($version, $vcl_template, $store_file_mb = 1024) {
|
||||
$varnish_user = 'varnish'
|
||||
$varnish_group = 'varnish'
|
||||
class varnish::debian($version, $vcl, $store_file_mb = 1024) {
|
||||
$user = 'varnish'
|
||||
$group = 'varnish'
|
||||
|
||||
user { $varnish_user: uid => 27835 }
|
||||
|
||||
@ -11,7 +11,7 @@ class varnish::debian($version, $vcl_template, $store_file_mb = 1024) {
|
||||
class { 'varnish':
|
||||
version => $version,
|
||||
require => Package[$packages],
|
||||
vcl_template => $vcl_template
|
||||
vcl_template => $vcl
|
||||
}
|
||||
|
||||
init_d { 'varnish':
|
||||
@ -21,7 +21,7 @@ class varnish::debian($version, $vcl_template, $store_file_mb = 1024) {
|
||||
}
|
||||
|
||||
exec { 'ensure-data-store-ownership':
|
||||
command => "chown -R ${varnish_user}:${varnish_group} ${varnish::data}",
|
||||
command => "chown -R ${user}:${group} ${varnish::data}",
|
||||
path => $base::path,
|
||||
require => Class['varnish']
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ class varnish($version, $vcl_template, $store_file_mb = 1024) {
|
||||
$varnish_stop = "service varnish stop"
|
||||
|
||||
file { $vcl_path:
|
||||
content => template($vcl_template),
|
||||
content => $vcl_template,
|
||||
require => Build_and_install[$name]
|
||||
}
|
||||
|
||||
|
17
shared/additional-modules/varnish/manifests/redhat.pp
Normal file
17
shared/additional-modules/varnish/manifests/redhat.pp
Normal file
@ -0,0 +1,17 @@
|
||||
class varnish::redhat($version, $user, $group, $vcl) {
|
||||
$init_d_prolog = template('varnish/redhat/init-d-prolog')
|
||||
$init_d_prerun = template('varnish/redhat/init-d-prerun')
|
||||
|
||||
class { varnish:
|
||||
vcl_template => $vcl,
|
||||
version => $version
|
||||
}
|
||||
|
||||
$varnish_init_d = "${varnish::share}/varnish-init.d"
|
||||
file { $varnish_init_d:
|
||||
content => template('varnish/varnish-init.d'),
|
||||
require => Mkdir_p[$varnish::share],
|
||||
mode => 755
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
#
|
||||
# varnish Control the Varnish Cache
|
||||
#
|
||||
# chkconfig: - 90 10
|
||||
# description: Varnish is a high-perfomance HTTP accelerator
|
||||
# processname: varnishd
|
||||
# config: /etc/sysconfig/varnish
|
||||
# pidfile: /var/run/varnishd.pid
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: varnish
|
||||
# Required-Start: $network $local_fs $remote_fs
|
||||
# Required-Stop: $network $local_fs $remote_fs
|
||||
# Default-Start:
|
||||
# Default-Stop:
|
||||
# Should-Start: $syslog
|
||||
# Short-Description: start and stop varnishd
|
||||
# Description: Varnish is a high-perfomance HTTP accelerator
|
||||
### END INIT INFO
|
@ -3,6 +3,9 @@
|
||||
<%= init_d_prolog %>
|
||||
<%= init_d_prerun %>
|
||||
|
||||
USER=<%= user %>
|
||||
GROUP=<%= group %>
|
||||
|
||||
start() {
|
||||
echo -n "Starting $NAME: "
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user