Skip to content

Commit

Permalink
Fix bug in service_autorestart::systemd preventing Debian (Ubuntu) ba…
Browse files Browse the repository at this point in the history
…sed hosts from working correctly
  • Loading branch information
nmaludy committed May 26, 2020
1 parent 962af0d commit 3d4aec3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file.

## Release 0.1.2

**Bugfixes**

* Fixed `service_autorestart::systemd` from throwing and error on Ubuntu because it was using a different
path for `.service` files. We now use module-level hiera data to default these locations.

## Release 0.1.1

**Bugfixes**
Expand Down
2 changes: 2 additions & 0 deletions data/os/Debian.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
service_autorestart::systemd_dir: /lib/systemd/system
2 changes: 2 additions & 0 deletions data/os/RedHat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
service_autorestart::systemd_dir: /usr/lib/systemd/system
3 changes: 2 additions & 1 deletion manifests/systemd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
# }
#
define service_autorestart::systemd (
String $path = "/usr/lib/systemd/system/${title}.service",
String $systemd_dir = lookup('service_autorestart::systemd_dir') |$k| { '/usr/lib/systemd/system' },
String $path = "${systemd_dir}/${title}.service",
String $value = 'on-failure',
Optional[String] $delay = undef,
Boolean $autonotify_path = true,
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "encore-service_autorestart",
"version": "0.1.1",
"version": "0.1.2",
"author": "Encore Technologies",
"summary": "Puppet module to manage auto-restarting services (Windows and SystemD), and Windows Service Recovery options",
"license": "Apache-2.0",
Expand Down

0 comments on commit 3d4aec3

Please sign in to comment.