Skip to content

Commit

Permalink
Add parameter to manage service
Browse files Browse the repository at this point in the history
  • Loading branch information
chr1s692 authored Jul 12, 2023
1 parent 4b2b966 commit ccb2387
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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,
}
}
}

0 comments on commit ccb2387

Please sign in to comment.