-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding capability to configure apps. Effectively, this sets up a jkMo…
…unt for the supplied name. These queue up into a single file, so that they will be added/removed as needed.
- Loading branch information
Showing
5 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
class apache2::jk::app | ||
{ | ||
concat { $params::jkAppsConfigPath : | ||
ensure => present, | ||
notify => $apache2::serviceNotify, | ||
require => Package[ $params::jkPackageName ], | ||
} | ||
|
||
|
||
concat::fragment { "$params::jkAppsConfigPath-fragment-pre" : | ||
target => $params::jkAppsConfigPath, | ||
order => 01, | ||
content => "<IfModule mod_jk.c>\n", | ||
} | ||
|
||
concat::fragment { "$params::jkAppsConfigPath-fragment-post" : | ||
target => $params::jkAppsConfigPath, | ||
order => 99, | ||
content => "</IfModule>\n", | ||
} | ||
} | ||
|
||
define apache2::jk::addApp | ||
( | ||
$appName = $name | ||
) | ||
{ | ||
include apache2::params | ||
|
||
validate_string( $appName ) | ||
|
||
# Pick the template path we're going to use | ||
$mod_path = get_module_path('apache2') | ||
$specific = "$mod_path/templates/$operatingsystem/$operatingsystemrelease$params::jkAppsConfigPath-app-fragment.erb" | ||
$default = "$mod_path/templates/default$params::jkAppsConfigPath-app-fragment.erb" | ||
|
||
# write the config file | ||
concat::fragment { $appName : | ||
target => $params::jkAppsConfigPath, | ||
order => 10, | ||
content => inline_template( file( $specific, $default ) ), | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
templates/default/etc/apache2/conf.d/jkApps.conf.inc-app-fragment.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<Location "/<%= @appName -%>*"> | ||
# see conf.d/access.conf for other access controls | ||
JkMount localJvm1 | ||
Require host localhost | ||
Require ip 127.0.0.1 | ||
</Location> |