Skip to content

Commit

Permalink
filling in package, enableModule and config file pieces.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim McLaughlin committed Dec 3, 2014
1 parent 0514e1b commit 4f866f4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
18 changes: 18 additions & 0 deletions manifests/jk.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,26 @@
validate_string( $jkWorkerPort )

# install the package
package { $params::jkPackageName :
ensure => latest,
}

# include the module
apache2::enableModule{ 'jk':
require => Package[ $params::jkPackageName ],
}

# Pick the template path we're going to use
$mod_path = get_module_path('apache2')
$specific = "$mod_path/templates/$operatingsystem/$operatingsystemrelease$params::jkConfigPath.erb"
$default = "$mod_path/templates/default$params::jkConfigPath.erb"

# write the config file
file { $apache2::jkConfigPath :
ensure => file,
content => inline_template( file( $specific, $default ) ),
notify => $apache2::serviceNotify,
require => Package[ $params::jkPackageName ],
}

}
3 changes: 3 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
$serviceName = "apache2"
$packageName = "apache2"

$jkPackageName = "apache2-mod_jk"
$php5PackageName = "apache2-mod_php5"

$sysconfigPath = "/etc/sysconfig/apache2"

$configDirPath = "/etc/apache2"
Expand Down

0 comments on commit 4f866f4

Please sign in to comment.