Skip to content
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

(feat) - Amazon Linux 2 compatibility added #1898

Merged
merged 1 commit into from
Mar 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions manifests/default_mods.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
::apache::mod { 'systemd': }
}
}
if ($::operatingsystem == 'Amazon' and $::operatingsystemrelease == '2') {
::apache::mod { 'systemd': }
}
::apache::mod { 'unixd': }
}
}
Expand Down
2 changes: 1 addition & 1 deletion manifests/mod.pp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
if $package {
$_package = $package
} elsif has_key($mod_packages, $mod) { # 2.6 compatibility hack
if ($::apache::apache_version == '2.4' and $::operatingsystem =~ /^[Aa]mazon$/) {
if ($::apache::apache_version == '2.4' and $::operatingsystem =~ /^[Aa]mazon$/ and $::operatingsystemmajrelease != '2') {
# On amazon linux we need to prefix our package name with mod24 instead of mod to support apache 2.4
$_package = regsubst($mod_packages[$mod],'^(mod_)?(.*)','mod24_\2')
} else {
Expand Down
11 changes: 8 additions & 3 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,14 @@
$conf_dir = "${httpd_dir}/conf"
$confd_dir = "${httpd_dir}/conf.d"
$conf_enabled = undef
$mod_dir = $::apache::version::distrelease ? {
'7' => "${httpd_dir}/conf.modules.d",
default => "${httpd_dir}/conf.d",
if $::operatingsystem =~ /^[Aa]mazon$/ and $::operatingsystemmajrelease == '2' {
# Amazon Linux 2 uses the /conf.modules.d/ dir
$mod_dir = "${httpd_dir}/conf.modules.d"
} else {
$mod_dir = $::apache::version::distrelease ? {
'7' => "${httpd_dir}/conf.modules.d",
default => "${httpd_dir}/conf.d",
}
}
$mod_enable_dir = undef
$vhost_dir = "${httpd_dir}/conf.d"
Expand Down