diff --git a/manifests/init.pp b/manifests/init.pp index d9c2fa2a..3d31dbf0 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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, diff --git a/manifests/service.pp b/manifests/service.pp index f47e8922..c585697c 100644 --- a/manifests/service.pp +++ b/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, + } } }