简体   繁体   中英

How can I install a global custom provider for puppet?

I'm wanting to use the chocolatey puppet provider as a package source for windows. My understanding is that I have to save the file to {module}/lib/puppet/provider/package/chocolatey.rb . That seems ok if I'm only ever going to use it in one specific module. But what if I want to make it available to all my modules?

好的,为了回答 - 只需将它作为模块安装在chocolatey / lib / puppet / provider / package / chocolatey.rb文件夹下,它就可供所有模块使用。

I added this since it couldn't find the environment variable. This will only happen when you install Chocolatey as part as your puppet manifests.

if chocopath.empty?
    puts "Could not find environment variable value for ENV['ChocolateyInstall']. Using C:\ChocolateyInstall instead"
    chocopath = 'C:\Chocolatey'
  end

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM