Sha256: c9cb5deeb097172ac14e52d0360fa713cf3b732de40f1dda831e59c4732920c7

Contents?: true

Size: 697 Bytes

Versions: 395

Compression:

Stored size: 697 Bytes

Contents

require 'puppet/settings/base_setting'

# 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
class Puppet::Settings::AutosignSetting < Puppet::Settings::FileSetting

  def munge(value)
    if ['true', true].include? value
      true
    elsif ['false', false, nil].include? value
      false
    elsif Puppet::Util.absolute_path?(value)
      value
    else
      raise Puppet::Settings::ValidationError, _("Invalid autosign value %{value}: must be 'true'/'false' or an absolute path") % { value: value }
    end
  end
end

Version data entries

395 entries across 395 versions & 2 rubygems

Version Path
puppet-6.29.0 lib/puppet/settings/autosign_setting.rb
puppet-6.29.0-x86-mingw32 lib/puppet/settings/autosign_setting.rb
puppet-6.29.0-x64-mingw32 lib/puppet/settings/autosign_setting.rb
puppet-6.29.0-universal-darwin lib/puppet/settings/autosign_setting.rb
puppet-6.28.0 lib/puppet/settings/autosign_setting.rb
puppet-6.28.0-x86-mingw32 lib/puppet/settings/autosign_setting.rb
puppet-6.28.0-x64-mingw32 lib/puppet/settings/autosign_setting.rb
puppet-6.28.0-universal-darwin lib/puppet/settings/autosign_setting.rb
puppet-6.27.0 lib/puppet/settings/autosign_setting.rb
puppet-6.27.0-x86-mingw32 lib/puppet/settings/autosign_setting.rb
puppet-6.27.0-x64-mingw32 lib/puppet/settings/autosign_setting.rb
puppet-6.27.0-universal-darwin lib/puppet/settings/autosign_setting.rb
puppet-6.26.0 lib/puppet/settings/autosign_setting.rb
puppet-6.26.0-x86-mingw32 lib/puppet/settings/autosign_setting.rb
puppet-6.26.0-x64-mingw32 lib/puppet/settings/autosign_setting.rb
puppet-6.26.0-universal-darwin lib/puppet/settings/autosign_setting.rb
puppet-6.25.1 lib/puppet/settings/autosign_setting.rb
puppet-6.25.1-x86-mingw32 lib/puppet/settings/autosign_setting.rb
puppet-6.25.1-x64-mingw32 lib/puppet/settings/autosign_setting.rb
puppet-6.25.1-universal-darwin lib/puppet/settings/autosign_setting.rb