Skip to content

Commit

Permalink
Fix bug where systemd was always assumed, if not windows
Browse files Browse the repository at this point in the history
  • Loading branch information
nmaludy committed May 22, 2020
1 parent dba7056 commit 962af0d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 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.1

**Bugfixes**

* Change from using `$facts['os']['family']` to `$facts['service_provider']` from `puppetlabs/stdlib`.
This allows `service_autorestart::generic` to "do the right thing" when detecting systemd.

## Release 0.1.0

**Features**
Expand Down
5 changes: 3 additions & 2 deletions manifests/generic.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
# to tweak settings, you'll need to declare the `service_autorestart::windows`
# or `service_autorestart::systemd` directly.
define service_autorestart::generic () {
case $facts['os']['family'] {
case $facts['service_provider'] {
'windows': {
service_autorestart::windows { $title: }
}
default: {
'systemd': {
service_autorestart::systemd { $title: }
}
default: {}
}
}
6 changes: 5 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"name": "encore-service_autorestart",
"version": "0.1.0",
"version": "0.1.1",
"author": "Encore Technologies",
"summary": "Puppet module to manage auto-restarting services (Windows and SystemD), and Windows Service Recovery options",
"license": "Apache-2.0",
"source": "https://github.com/EncoreTechnologies/puppet-service_autorestart",
"project_page": "https://github.com/EncoreTechnologies/puppet-service_autorestart",
"issues_url": "https://github.com/EncoreTechnologies/puppet-service_autorestart/issues",
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.0.0 < 7.0.0"
},
{
"name": "puppetlabs/inifile",
"version_requirement": ">= 3.0.0 < 5.0.0"
Expand Down

0 comments on commit 962af0d

Please sign in to comment.