Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sssd_facts.rb is trying to run on windows and causing errors #59

Open
TJM opened this issue Jun 27, 2017 · 4 comments
Open

sssd_facts.rb is trying to run on windows and causing errors #59

TJM opened this issue Jun 27, 2017 · 4 comments

Comments

@TJM
Copy link

TJM commented Jun 27, 2017

puppet : Error: Facter: error while resolving custom facts in CProgramData/PuppetLabs/puppet/cache/lib\facter\sssd_facts.rb: cannot load such file 
-- augeas
At line:1 char:1
+ puppet agent -t --environment test_cert
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error: Facter: ... file -- augeas:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
Error: Facter: error while resolving custom facts in CProgramData/PuppetLabs/puppet/cache/lib/facter\sssd_facts.rb: cannot load such file -- augeas

I think you can block facts on kernel or whatever to prevent them from running on inappropriate OS's.

@TJM
Copy link
Author

TJM commented Jun 28, 2017

So its the require 'augeas' line that causes it, we worked around the issue by adding:

begin

... to the top and this to the end:

rescue LoadError
  # Do Nothing if the gem is not present
end

@hboetes
Copy link

hboetes commented Nov 19, 2018

@TJM thanks for the heads up. I can confirm it fixed my issue. Could you be so kind as to create a pull request? Thanks!

@TJM
Copy link
Author

TJM commented Nov 19, 2018

That was several customers ago for me. I will look later and see if I can find it in my past projects.

EDIT: Just looking at this, it should probably not be worked around quite like this. There should probably be a platform check of some sort, so that it doesn't fail silently on the target OS :)

@hboetes
Copy link

hboetes commented Nov 19, 2018

ok, let's call it a workaround and not a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants