class Puppet::Settings::AutosignSetting

A specialization of the file setting to allow boolean values.

The autosign value can be either a boolean or a file path, and if the setting is a file path then it may have a owner/group/mode specified.

@api private

Public Instance Methods

munge(value) click to toggle source
   # File lib/puppet/settings/autosign_setting.rb
12 def munge(value)
13   if ['true', true].include? value
14     true
15   elsif ['false', false, nil].include? value
16     false
17   elsif Puppet::Util.absolute_path?(value)
18     value
19   else
20     raise Puppet::Settings::ValidationError, _("Invalid autosign value %{value}: must be 'true'/'false' or an absolute path") % { value: value }
21   end
22 end