Puppet Function: ensure_service
- Defined in:
- puppet/modules/wmflib/lib/puppet/parser/functions/ensure_service.rb
- Function type:
- Ruby 3.x API
Overview
24 25 26 27 28 29 30 31 |
# File 'puppet/modules/wmflib/lib/puppet/parser/functions/ensure_service.rb', line 24 newfunction(:ensure_service, :type => :rvalue, :arity => 1) do |args| ensure_param = args.first case ensure_param when 'running', 'present', 'true', true then 'running' when 'stopped', 'absent', 'false', false then 'stopped' else fail(ArgumentError, "ensure_service(): invalid argument: '#{ensure_param}'.") end end |