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

Add parameter to manage service #809

Merged
merged 7 commits into from Jul 12, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions manifests/init.pp
Expand Up @@ -279,9 +279,13 @@
#
# $registration_url:: URL that hosts will connect to when registering
#
# $manage_service:: control the service, whether it should be started / enabled or not. useful, if the
# service should be managed by a cluster software e.g. corosync / pacemaker
#
class foreman_proxy (
String $version = 'present',
Enum['latest', 'present', 'installed', 'absent'] $ensure_packages_version = 'installed',
Boolean $manage_service = true,
Variant[Array[String], String] $bind_host = ['*'],
Stdlib::Port $http_port = 8000,
Stdlib::Port $ssl_port = 8443,
Expand Down
8 changes: 5 additions & 3 deletions manifests/service.pp
@@ -1,8 +1,10 @@
# @summary Set up the foreman service
# @api private
class foreman_proxy::service {
service { 'foreman-proxy':
ensure => running,
enable => true,
if $foreman_proxy::manage_service {
service { 'foreman-proxy':
ensure => running,
enable => true,
}
}
}