Skip to content

Commit

Permalink
adding support for Amazon Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Reus authored and ekohl committed Apr 27, 2018
1 parent 98aa874 commit ee01cff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -342,14 +342,15 @@
# PSBM is a CentOS 6 based distribution
# it reports its $osreleasemajor as 2, not 6.
# thats why we're matching for '2' in both parts
# Amazon Linux is like RHEL6 but reports its osreleasemajor as 2017.
$osreleasemajor = regsubst($::operatingsystemrelease, '^(\d+)\..*$', '\1') # workaround for the possibly missing operatingsystemmajrelease
$agent_restart_command = $osreleasemajor ? {
/^(2|5|6)$/ => "/sbin/service ${service_name} reload",
/^(2|5|6|2017)$/ => "/sbin/service ${service_name} reload",
'7' => "/usr/bin/systemctl reload-or-restart ${service_name}",
default => undef,
}
$unavailable_runmodes = $osreleasemajor ? {
/^(2|5|6)$/ => ['systemd.timer'],
/^(2|5|6|2017)$/ => ['systemd.timer'],
default => [],
}
}
Expand Down

0 comments on commit ee01cff

Please sign in to comment.