Skip to content

Respect $service_status on Red Hat-based distros #1351

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

Merged
Merged
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
4 changes: 2 additions & 2 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@

if pick($service_provider, $facts['service_provider']) == 'systemd' {
$service_reload = "systemctl reload ${service_name}"
$service_status = "systemctl status ${service_name}"
$service_status = pick($service_status, "systemctl status ${service_name}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked how/when $service_status is set and there is a lot that could be improved/simplified here :(

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #1349 for more discussion on that. I also wonder if this isn't really redundant since AFAIK Puppet itself can determine the status using these commands.

} else {
$service_reload = "service ${service_name} reload"
$service_status = "service ${service_name} status"
$service_status = pick($service_status, "service ${service_name} status")
}

$psql_path = pick($psql_path, "${bindir}/psql")
Expand Down