From 3a29c5e5524024df72c3152022640a5e369faf86 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 14 Dec 2015 16:52:37 -0500 Subject: [PATCH] Fixing error when disabling service management and the service does not exist --- manifests/server/service.pp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/manifests/server/service.pp b/manifests/server/service.pp index 6b9a053..60a4bca 100644 --- a/manifests/server/service.pp +++ b/manifests/server/service.pp @@ -26,11 +26,13 @@ class mysql::server::service { } } - service { 'mysqld': - ensure => $service_ensure, - name => $mysql::server::service_name, - enable => $mysql::server::real_service_enabled, - provider => $mysql::server::service_provider, + if $mysql::server::real_service_manage { + service { 'mysqld': + ensure => $service_ensure, + name => $mysql::server::service_name, + enable => $mysql::server::real_service_enabled, + provider => $mysql::server::service_provider, + } } # only establish ordering between service and package if