Skip to content

Commit 83d460b

Browse files
committed
(PUP-9319) Use remote environment for puppet device
This commit uses a "remote" environment, instead of a full one. This allows the override to work, even if we do not have that environment's codedir available locally. In the case of a full puppet run, the `Configurer` does additional work to update and sync the plugindir vs what the ENC specifies. # Conflicts: # spec/unit/application/device_spec.rb
1 parent 0e0535b commit 83d460b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/application/device.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def main
237237
confdir = Puppet[:confdir]
238238
certname = Puppet[:certname]
239239

240-
env = Puppet.lookup(:environments).get(Puppet[:environment])
240+
env = Puppet::Node::Environment.remote(Puppet[:environment])
241241
returns = Puppet.override(:current_environment => env, :loaders => Puppet::Pops::Loaders.new(env)) do
242242
# find device list
243243
require 'puppet/util/network_device/config'

0 commit comments

Comments
 (0)