Class: Puppet::Application::Certificate

Inherits:
IndirectionBase show all
Defined in:
lib/puppet/application/certificate.rb

Constant Summary

Constants inherited from Puppet::Application

DOCPATTERN

Constants included from Util

Util::AbsolutePathPosix, Util::AbsolutePathWindows, Util::DEFAULT_POSIX_MODE, Util::DEFAULT_WINDOWS_MODE

Constants included from Util::POSIX

Util::POSIX::LOCALE_ENV_VARS, Util::POSIX::USER_ENV_VARS

Constants included from Util::SymbolicFileMode

Util::SymbolicFileMode::SetGIDBit, Util::SymbolicFileMode::SetUIDBit, Util::SymbolicFileMode::StickyBit, Util::SymbolicFileMode::SymbolicMode, Util::SymbolicFileMode::SymbolicSpecialToBit

Instance Attribute Summary

Attributes inherited from FaceBase

#action, #arguments, #face, #render_as, #type

Attributes inherited from Puppet::Application

#command_line, #options

Instance Method Summary collapse

Methods inherited from FaceBase

#find_application_argument, #find_global_settings_argument, #main, #parse_options, #preinit, #render

Methods inherited from Puppet::Application

[], #app_defaults, available_application_names, banner, clear!, clear?, clear_everything_for_tests, #configure_indirector_routes, controlled_run, #deprecate, #deprecated?, exit, find, #handle_logdest_arg, #handlearg, #help, #initialize, #initialize_app_defaults, interrupted?, #log_runtime_environment, #main, #name, option, option_parser_commands, #parse_options, #preinit, restart!, restart_requested?, #run, #run_command, run_mode, #set_log_level, #setup_logs, stop!, stop_requested?, #summary, try_load_class

Methods included from Util

absolute_path?, benchmark, chuser, clear_environment, default_env, deterministic_rand, deterministic_rand_int, exit_on_fail, get_env, get_environment, logmethods, merge_environment, path_to_uri, pretty_backtrace, replace_file, safe_posix_fork, set_env, symbolizehash, thinmark, uri_encode, uri_query_encode, uri_to_path, which, withenv, withumask

Methods included from Util::POSIX

#get_posix_field, #gid, #idfield, #methodbyid, #methodbyname, #search_posix_field, #uid

Methods included from Util::SymbolicFileMode

#normalize_symbolic_mode, #symbolic_mode_to_int, #valid_symbolic_mode?

Constructor Details

This class inherits a constructor from Puppet::Application

Instance Method Details

#setupObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/puppet/application/certificate.rb', line 5

def setup
  Puppet::SSL::Oids.register_puppet_oids
  location = Puppet::SSL::Host.ca_location
  if location == :local && !Puppet::SSL::CertificateAuthority.ca?
    # I'd prefer if this could be dealt with differently; ideally, run_mode should be set as
    #  part of a class definition, and should not be modifiable beyond that.  This is one of
    #  the cases where that isn't currently possible.
    Puppet.settings.preferred_run_mode = "master"
  end

  super
end