forked from jpogran/PuppetDscBuilder
-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Using Open Source Puppet on Windows Server 2016-2025
Seems like the merged PR #308 added an invalid path to where the providers are located
When running dsc-networkingdsc version 9.0.0-0-9 and all other updated dsc-modules with the change to require_relative we get the following error
Could not autoload puppet/provider/dsc_firewall/dsc_firewall: cannot load such file -- C:/ProgramData/PuppetLabs/puppet/pwshlib/lib/puppet/provider/dsc_base_provider/dsc_base_provider
Could not autoload puppet/type/dsc_firewall: Could not autoload puppet/provider/dsc_firewall/dsc_firewall: cannot load such file -- C:/ProgramData/PuppetLabs/puppet/pwshlib/lib/puppet/provider/dsc_base_provider/dsc_base_provider
Failed to apply catalog: Could not autoload puppet/type/dsc_firewall: Could not autoload puppet/provider/dsc_firewall/dsc_firewall: cannot load such file -- C:/ProgramData/PuppetLabs/puppet/pwshlib/lib/puppet/provider/dsc_base_provider/dsc_base_provider
The pwshlib-folder does not exist at that location
PS C:\> Test-Path C:\ProgramData\PuppetLabs\puppet\pwshlib
False
Making sure what content is present in the dsc_firewall-provider
get-content C:\ProgramData\PuppetLabs\puppet\var\lib\puppet\provider\dsc_firewall\dsc_firewall.rb
require_relative '../../../../../pwshlib/lib/puppet/provider/dsc_base_provider/dsc_base_provider'
# Implementation for the dsc_type type using the Resource API.
class Puppet::Provider::DscFirewall::DscFirewall < Puppet::Provider::DscBaseProvider
end
Where it is located
gci 'C:\programdata\PuppetLabs\puppet\' -Recurse | where name -eq "dsc_base_provider.rb" | select FullName
FullName
--------
C:\programdata\PuppetLabs\puppet\cache\lib\puppet\provider\dsc_base_provider\dsc_base_provider.rb
C:\programdata\PuppetLabs\puppet\var\lib\puppet\provider\dsc_base_provider\dsc_base_provider.rb
Creating a symlink fixes the problem and puppet runs fine
New-Item -ItemType SymbolicLink -Path "C:\ProgramData\PuppetLabs\puppet\pwshlib" -Target "C:\ProgramData\PuppetLabs\puppet\var"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels