Skip to content
Snippets Groups Projects
Commit df9f56d6 authored by Andrea Biancini's avatar Andrea Biancini
Browse files

Fixed precedences

parent 655c7417
No related branches found
No related tags found
No related merge requests found
......@@ -7,14 +7,12 @@
# +tomcat_admin_password+:: If the Tomcat administration interface is going to be installed this parameter permits to specify the password for the 'admin' user used by tomcat to access the administration interface.
# +tomcat_manager_password+:: If the Tomcat administration interface is going to be installed this parameter permits to specify the password for the 'manager' user used by tomcat to access the administration interface.
#
class tomcat::admin(
$tomcat_admin_password = 'adminpassword',
$tomcat_manager_password = 'managerpassword',
) {
$curtomcat = $::tomcat::curtomcat
Class[$curtomcat] -> Class['tomcat::admin']
class tomcat::admin(
$tomcat_admin_password = 'adminpassword',
$tomcat_manager_password = 'managerpassword',
) {
$curtomcat = $::tomcat::curtomcat
package { "tomcat-admin":
ensure => present,
......@@ -22,6 +20,8 @@ class tomcat::admin(
require => Package[$curtomcat],
}
Class["Tomcat::Admin"] ~> Service[$curtomcat]
augeas { "tomcat_users_role_manager":
context => "/files/etc/${curtomcat}/tomcat-users.xml",
changes => [
......
......@@ -13,11 +13,14 @@ class tomcat::tomcat6 {
package {
["liblog4j1.2-java", "libcommons-logging-java", "libtomcat6-java"]:
ensure => present;
ensure => present,
before => Class['tomcat::admin'],
require => Class['shib2common::java::package'];
["tomcat6-common", "tomcat6"]:
ensure => present;
ensure => present,
before => Class['tomcat::admin'],
require => Class['shib2common::java::package'];
}
service { "tomcat6":
......
......@@ -14,10 +14,12 @@ class tomcat::tomcat7 {
package {
["liblog4j1.2-java", "libcommons-logging-java", "libtomcat7-java"]:
ensure => present,
before => Class['tomcat::admin'],
require => Class['shib2common::java::package'];
["tomcat7-common", "tomcat7"]:
ensure => present,
before => Class['tomcat::admin'],
require => Class['shib2common::java::package'];
}
......@@ -33,16 +35,6 @@ class tomcat::tomcat7 {
$catalina_home = '/var/lib/tomcat7'
# Default JVM options
file {"${tomcat_home}/bin/setenv.sh":
content => join(['export JAVA_HOME="/usr/lib/jvm/java-7-oracle"',
'export JAVA_ENDORSED_DIRS="/usr/share/tomcat7/endorsed"'], "\n"),
owner => "root",
group => "root",
mode => 755,
require => Package["tomcat7"],
before => Service["tomcat7"],
}
file { "log4j.properties":
path => "${catalina_home}/conf/log4j.properties",
source => $::log4j_conffile ? {
......@@ -50,6 +42,7 @@ class tomcat::tomcat7 {
"" => "puppet:///modules/tomcat/conf/log4j.rolling.properties",
},
require => Package["tomcat7"],
before => Service["tomcat7"],
}
# Verify that /etc/environment has the correct lines
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment