Method: Puppet::Application.environment_mode
- Defined in:
- lib/puppet/application.rb
.environment_mode(mode_name) ⇒ Object
Sets environment_mode name. When acting as a compiler, the environment mode should be ‘:local` since the directory must exist to compile the catalog. When acting as an agent, the environment mode should be `:remote` since the Puppet setting refers to an environment directoy on a remote system. The `:not_required` mode is for cases where the application does not need an environment to run.
304 305 306 307 |
# File 'lib/puppet/application.rb', line 304 def environment_mode(mode_name) raise Puppet::Error, _("Invalid environment mode '%{mode_name}'") % { mode_name: mode_name } unless [:local, :remote, :not_required].include?(mode_name) @environment_mode = mode_name end |