Skip to content

Commit ccb2387

Browse files
authored
Add parameter to manage service
1 parent 4b2b966 commit ccb2387

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

manifests/init.pp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,13 @@
279279
#
280280
# $registration_url:: URL that hosts will connect to when registering
281281
#
282+
# $manage_service:: control the service, whether it should be started / enabled or not. useful, if the
283+
# service should be managed by a cluster software e.g. corosync / pacemaker
284+
#
282285
class foreman_proxy (
283286
String $version = 'present',
284287
Enum['latest', 'present', 'installed', 'absent'] $ensure_packages_version = 'installed',
288+
Boolean $manage_service = true,
285289
Variant[Array[String], String] $bind_host = ['*'],
286290
Stdlib::Port $http_port = 8000,
287291
Stdlib::Port $ssl_port = 8443,

manifests/service.pp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# @summary Set up the foreman service
22
# @api private
33
class foreman_proxy::service {
4-
service { 'foreman-proxy':
5-
ensure => running,
6-
enable => true,
4+
if $foreman_proxy::manage_service {
5+
service { 'foreman-proxy':
6+
ensure => running,
7+
enable => true,
8+
}
79
}
810
}

0 commit comments

Comments
 (0)