diff --git a/manifests/init.pp b/manifests/init.pp index 7be9071..4ab2c5c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,17 +1,12 @@ class shadow( - $manage_package = true, - $package_ensure = 'installed', - $manage_service = true, - $manage_docker_service = true, - $service_ensure = 'running', - $service_enable = true, - ) inherits shadow::params{ + $manage_package = true, + $package_ensure = 'installed', + ) inherits shadow::params{ validate_re($package_ensure, [ '^present$', '^installed$', '^absent$', '^purged$', '^held$', '^latest$' ], 'Not a supported package_ensure: present/absent/purged/held/latest') class { '::shadow::install': } -> class { '::shadow::config': } - ~> class { '::shadow::service': } -> Class['::shadow'] } diff --git a/manifests/service.pp b/manifests/service.pp deleted file mode 100644 index d03f408..0000000 --- a/manifests/service.pp +++ /dev/null @@ -1,24 +0,0 @@ -class shadow::service inherits shadow { - - # - validate_bool($shadow::manage_docker_service) - validate_bool($shadow::manage_service) - validate_bool($shadow::service_enable) - - validate_re($shadow::service_ensure, [ '^running$', '^stopped$' ], "Not a valid daemon status: ${shadow::service_ensure}") - - $is_docker_container_var=getvar('::eyp_docker_iscontainer') - $is_docker_container=str2bool($is_docker_container_var) - - if( $is_docker_container==false or - $shadow::manage_docker_service) - { - if($shadow::manage_service) - { - service { $shadow::params::service_name: - ensure => $shadow::service_ensure, - enable => $shadow::service_enable, - } - } - } -}