updates and stuff
This commit is contained in:
parent
3ee80e88a4
commit
b35ac7f405
@ -47,10 +47,15 @@ Capistrano::Configuration.instance.load do
|
||||
desc "Apply the configuration"
|
||||
task :apply do
|
||||
top.copy_files
|
||||
top.rename if rename_server && wrong_server_name?
|
||||
|
||||
run "cd #{puppet_dir} && #{sudo} ./apply"
|
||||
end
|
||||
|
||||
def wrong_server_name?
|
||||
capture("hostname").strip
|
||||
end
|
||||
|
||||
desc "Bootstrap the server"
|
||||
task :bootstrap do
|
||||
top.copy_files
|
||||
|
@ -14,6 +14,7 @@ class base {
|
||||
$log_path = "/var/log"
|
||||
$local_path = $install_path
|
||||
$share_path = "/usr/local/share"
|
||||
$data_path = "/var/data"
|
||||
}
|
||||
|
||||
node default {
|
||||
@ -21,7 +22,5 @@ node default {
|
||||
include debian
|
||||
|
||||
class { base: require => Class['basics'] }
|
||||
|
||||
include umask
|
||||
}
|
||||
|
||||
|
@ -33,11 +33,6 @@ class varnish($version, $store_file_mb = 1024) {
|
||||
require => Build_and_install[$name]
|
||||
}
|
||||
|
||||
file { $varnish::vcl_path:
|
||||
content => template('varnish-redhat/default.vcl'),
|
||||
require => [ Mkdir_p[$config] ]
|
||||
}
|
||||
|
||||
file { $override_config:
|
||||
ensure => present,
|
||||
mode => 644,
|
||||
|
@ -3,6 +3,7 @@ Puppet::Type.type(:configure).provide(:action) do
|
||||
|
||||
def create
|
||||
system %{bash -c '#{path} cd #{@resource[:build_path]} ; #{@resource[:preconfigure]} ./configure --prefix=#{@resource[:install_path]} #{@resource[:options]}'}.tap { |o| p o }
|
||||
raise StandardError.new("Could not configure") if $?.exitstatus != 0
|
||||
end
|
||||
|
||||
def destroy
|
||||
@ -21,9 +22,10 @@ Puppet::Type.type(:configure).provide(:action) do
|
||||
end
|
||||
|
||||
def unless?
|
||||
return nil if @resource[:unless].empty?
|
||||
return nil if !@resource[:unless] || @resource[:unless].empty?
|
||||
|
||||
system %{bash -c '#{@resource[:unless]}'}
|
||||
|
||||
$?.exitstatus == 0
|
||||
end
|
||||
|
||||
|
@ -22,7 +22,7 @@ Puppet::Type.type(:download_and_unpack).provide(:action) do
|
||||
|
||||
private
|
||||
def unless?
|
||||
return nil if @resource[:unless].empty?
|
||||
return nil if !@resource[:unless] || @resource[:unless].empty?
|
||||
|
||||
system %{bash -c '#{@resource[:unless]}'}
|
||||
|
||||
|
@ -5,6 +5,7 @@ Puppet::Type.type(:make_and_install).provide(:action) do
|
||||
|
||||
def create
|
||||
system %{bash -c '#{path} cd #{@resource[:build_path]} ; make && make install'}
|
||||
raise StandardError.new("Could not make and install") if $?.exitstatus != 0
|
||||
|
||||
FileUtils.rm_rf symlink_path
|
||||
FileUtils.ln_sf(@resource[:install_path], symlink_path)
|
||||
@ -23,9 +24,10 @@ Puppet::Type.type(:make_and_install).provide(:action) do
|
||||
|
||||
private
|
||||
def unless?
|
||||
return nil if @resource[:unless].empty?
|
||||
return nil if !@resource[:unless] || @resource[:unless].empty?
|
||||
|
||||
system %{bash -c '#{@resource[:unless]}'}
|
||||
|
||||
$?.exitstatus == 0
|
||||
end
|
||||
|
||||
|
@ -8,6 +8,8 @@ fi
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export PAGER=cat
|
||||
|
||||
echo "deb http://backports.debian.org/debian-backports squeeze-backports main" > /etc/apt/sources.list.d/debian-backports.list
|
||||
|
||||
apt-get --force-yes update
|
||||
apt-get --force-yes -y remove x11-common xserver-xorg-video-all xserver-xorg-core xserver-xorg-video-radeon libgl1-mesa-dri mutt libdrm-intel1 libdrm-radeon1
|
||||
apt-get --force-yes -y install deborphan
|
||||
|
Loading…
Reference in New Issue
Block a user