puppetlabs / puppetlabs-chocolatey

Chocolatey Package Provider for Puppet
Apache License 2.0
19 stars 68 forks source link

Error while running on a Linux client #323

Closed bellegarde-c closed 1 year ago

bellegarde-c commented 1 year ago

Describe the Bug

We are using a puppet server to manage Windows and Linux clients.

Since, chocolatey module has been installed, we have warnings on Linux clients (not fatal)

Error: Could not autoload puppet/provider/package/chocolatey: cannot load such file -- rexml/document
Error: Facter: error while resolving custom facts in /var/lib/puppet/lib/facter/package_provider.rb Could not autoload puppet/provider/package/chocolatey: cannot load such file -- rexml/document
puppetserver   7.9.2-1bullseye
puppetlabs-chocolatey (v7.0.1)
rismoney commented 1 year ago

I think this is because rexml is an external gem from ruby, and this project needs to add it, instead of previous versions of ruby which included it.

Programie commented 1 year ago

I've the same issue. In my case, I'm using Puppet on Linux, Windows and a FreeBSD machine (pfSense).

As a workaround, I've simply installed the rexml gem using gem install rexml.

A better solution might be to check whether the gem is available in the chocolatey module or only include rexml in case of a Windows machine (as it should fail on Windows machines if rexml is missing).

pmcmaw commented 1 year ago

Hey, I am afraid this chocolatey module is only supported on Windows OS. It may at points be compatible with other OSs however for now we can only address issues in relation to our Supported Oss. Please check out metadata.json for a list of the OSs we currently support.