Puppet Class: tomcat::config
- Defined in:
- manifests/config.pp
Overview
Class: tomcat::config
This class configures tomcat. It should not be called directly.
Authors
-
Justin Lambert <jlambert@letsevenup.com>
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'manifests/config.pp', line 10
class tomcat::config {
if $caller_module_name != $module_name {
fail("Use of private class ${name} by ${caller_module_name}")
}
$install_dir = $::tomcat::install_dir
$admin_pass = $::tomcat::admin_pass
$java_opts = $::tomcat::java_opts
$env_vars = $::tomcat::env_vars
File {
ensure => 'file',
owner => 'tomcat',
group => 'tomcat',
mode => '0444',
notify => Class['tomcat::service'],
}
file { "${install_dir}/tomcat/conf/catalina.policy":
source => 'puppet:///modules/tomcat/catalina.policy',
}
file { "${install_dir}/tomcat/conf/context.xml":
source => 'puppet:///modules/tomcat/context.xml',
}
file { "${install_dir}/tomcat/conf/logging.properties":
source => 'puppet:///modules/tomcat/logging.properties',
}
file { "${install_dir}/tomcat/conf/tomcat-users.xml":
mode => '0440',
content => template('tomcat/tomcat-users.xml.erb'),
}
file { "${install_dir}/tomcat/bin/setenv.sh":
mode => '0544',
content => template('tomcat/setenv.sh.erb'),
}
file { "${install_dir}/tomcat/bin/web.xml":
source => 'puppet:///modules/tomcat/web.xml',
}
file { "${install_dir}/tomcat/conf/Catalina":
ensure => directory,
mode => '0555',
purge => true,
recurse => true,
force => true,
}
file { "${install_dir}/tomcat/conf/Catalina/localhost":
ensure => directory,
mode => '0555',
purge => true,
recurse => true,
}
concat{
"${install_dir}/tomcat/conf/server.xml":
owner => tomcat,
group => tomcat,
mode => '0444',
notify => Class['tomcat::service'],
}
concat::fragment{ 'server_xml_header':
target => "${install_dir}/tomcat/conf/server.xml",
content => template($::tomcat::header_fragment),
order => '01',
}
concat::fragment{ 'server_xml_footer':
target => "${install_dir}/tomcat/conf/server.xml",
content => template($::tomcat::footer_fragment),
order => '99',
}
}
|