This commit is contained in:
John Bintz 2012-05-16 06:43:53 -04:00
parent 7addee4f6f
commit 104ed53b16
3 changed files with 14 additions and 6 deletions

View File

@ -18,7 +18,7 @@ module Capistrano
def replace_placeholders(command, channel) def replace_placeholders(command, channel)
command = _replace_placeholders(command, channel) command = _replace_placeholders(command, channel)
command.gsub!('$CAPISTRANO:TARGETHOSTNAME$', channel[:server].options[:target_hostname]) command.gsub!('$CAPISTRANO:TARGETHOSTNAME$', channel[:server].options[:target_hostname] || '')
command command
end end
end end

View File

@ -14,7 +14,7 @@ class varnish::debian($version, $vcl_template, $store_file_mb = 1024) {
vcl_template => $vcl_template vcl_template => $vcl_template
} }
init_d_bundle { 'varnish': init_d { 'varnish':
init_d_prolog => template('varnish/debian/init-d-prolog'), init_d_prolog => template('varnish/debian/init-d-prolog'),
init_d_prerun => template('varnish/debian/init-d-prerun'), init_d_prerun => template('varnish/debian/init-d-prerun'),
require => Class['varnish'] require => Class['varnish']

View File

@ -3,25 +3,33 @@ define ssh {
file { $ssh_dir: file { $ssh_dir:
ensure => directory, ensure => directory,
mode => '2700' mode => '0700',
owner => $name,
group => $name
} }
file { "${ssh_dir}/authorized_keys": file { "${ssh_dir}/authorized_keys":
content => template("ssh/${name}/authorized_keys"), content => template("ssh/${name}/authorized_keys"),
require => File[$ssh_dir], require => File[$ssh_dir],
mode => '0644' mode => '0644',
owner => $name,
group => $name
} }
file { "${ssh_dir}/id_dsa": file { "${ssh_dir}/id_dsa":
content => template("ssh/${name}/id_dsa"), content => template("ssh/${name}/id_dsa"),
require => File[$ssh_dir], require => File[$ssh_dir],
mode => '0600' mode => '0600',
owner => $name,
group => $name
} }
file { "${ssh_dir}/id_dsa.pub": file { "${ssh_dir}/id_dsa.pub":
content => template("ssh/${name}/id_dsa.pub"), content => template("ssh/${name}/id_dsa.pub"),
require => File[$ssh_dir], require => File[$ssh_dir],
mode => '0644' mode => '0644',
owner => $name,
group => $name
} }
} }