Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
antoineco committed Jun 19, 2015
1 parent 96c88bb commit 53c02c5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 57 deletions.
32 changes: 15 additions & 17 deletions manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -965,32 +965,30 @@
'package' : {
$admin_webapps_path = $::osfamily ? {
'Debian' => "/usr/share/${::tomcat::admin_webapps_package_name_real}",
default => "\${catalina.home}/webapps"
default => '${catalina.home}/webapps'
} }
default : {
$admin_webapps_path = "\${catalina.home}/webapps"
$admin_webapps_path = '${catalina.home}/webapps'
}
}

file { "instance ${name} Catalina dir":
ensure => directory,
path => "${catalina_base_real}/conf/Catalina",
require => File["${catalina_base_real}/conf"]
} ->
file { "instance ${name} Catalina/${host_name} dir":
ensure => directory,
path => "${catalina_base_real}/conf/Catalina/${host_name}"
file { ["${catalina_base_real}/conf/Catalina","${catalina_base_real}/conf/Catalina/${host_name}"]:
ensure => directory
} ->
file {
::tomcat::context {
"instance ${name} manager.xml":
ensure => present,
path => "${catalina_base_real}/conf/Catalina/${host_name}/manager.xml",
content => template("${module_name}/instance/manager.xml.erb");
path => "${catalina_base_real}/conf/Catalina/${host_name}/manager.xml",
params => { 'path' => '/manager',
'docBase' => "${admin_webapps_path}/manager",
'antiResourceLocking' => false,
'privileged' => 'true' };

"instance ${name} host-manager.xml":
ensure => present,
path => "${catalina_base_real}/conf/Catalina/${host_name}/host-manager.xml",
content => template("${module_name}/instance/host-manager.xml.erb")
path => "${catalina_base_real}/conf/Catalina/${host_name}/host-manager.xml",
params => { 'path' => '/host-manager',
'docBase' => "${admin_webapps_path}/host-manager",
'antiResourceLocking' => false,
'privileged' => 'true' }
}
} else {
# warn if admin webapps were selected for installation
Expand Down
20 changes: 0 additions & 20 deletions templates/instance/host-manager.xml.erb

This file was deleted.

20 changes: 0 additions & 20 deletions templates/instance/manager.xml.erb

This file was deleted.

0 comments on commit 53c02c5

Please sign in to comment.