-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MODULES-956 Added loadfile_name parameter to apache::mod. #737
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
define apache::mod ( | ||
$package = undef, | ||
$package = undef, | ||
$package_ensure = 'present', | ||
$lib = undef, | ||
$lib_path = $::apache::params::lib_path, | ||
$id = undef, | ||
$path = undef, | ||
$loadfiles = undef, | ||
$lib = undef, | ||
$lib_path = $::apache::params::lib_path, | ||
$id = undef, | ||
$path = undef, | ||
$loadfile_name = undef, | ||
$loadfiles = undef, | ||
) { | ||
if ! defined(Class['apache']) { | ||
fail('You must include the apache base class before using any apache defined resources') | ||
|
@@ -39,6 +40,12 @@ | |
$_id = "${mod}_module" | ||
} | ||
|
||
if $loadfile_name { | ||
$_loadfile_name = $loadfile_name | ||
} else { | ||
$_loadfile_name = "${mod}.load" | ||
} | ||
|
||
# Determine if we have a package | ||
$mod_packages = $::apache::params::mod_packages | ||
$mod_package = $mod_packages[$mod] # 2.6 compatibility hack | ||
|
@@ -69,7 +76,7 @@ | |
|
||
file { "${mod}.load": | ||
ensure => file, | ||
path => "${mod_dir}/${mod}.load", | ||
path => "${mod_dir}/${_loadfile_name}", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cyberious, We keep That way we can always canonically refer to the file under a known name, throughout the entire module. And at the same time we have a different path, if we need one. |
||
owner => 'root', | ||
group => $::apache::params::root_group, | ||
mode => '0644', | ||
|
@@ -86,8 +93,8 @@ | |
$enable_dir = $::apache::mod_enable_dir | ||
file{ "${mod}.load symlink": | ||
ensure => link, | ||
path => "${enable_dir}/${mod}.load", | ||
target => "${mod_dir}/${mod}.load", | ||
path => "${enable_dir}/${_loadfile_name}", | ||
target => "${mod_dir}/${_loadfile_name}", | ||
owner => 'root', | ||
group => $::apache::params::root_group, | ||
mode => '0644', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use the$_loadfile_name here instead of the $ {mod}.load instead as that is the file we are taking action against?