ghoneycutt / puppet-module-ssh

Puppet module to manage SSH
Other
34 stars 184 forks source link

ssh module custom fact error #249

Closed andrewkzimmerman closed 7 years ago

andrewkzimmerman commented 7 years ago

I am getting the following error when running puppet agent -t on a client server (RHEL 6) using the ghoneycutt/ssh module. Attached is my init.pp. init.pp.txt

Error: Facter: error while resolving custom fact "ssh_version_numeric": undefined method `[]' for nil:NilClass

ghoneycutt commented 7 years ago

What's the output of ssh -V

andrewkzimmerman commented 7 years ago

OpenSSH_5.3p1, OpenSSL 1.0.1e-fips

/r, Andrew K. Zimmerman

-----Original Message----- From: Garrett Honeycutt [mailto:notifications@github.com] Sent: Wednesday, October 4, 2017 10:54 AM To: ghoneycutt/puppet-module-ssh puppet-module-ssh@noreply.github.com Cc: Zimmerman, Andrew K CTR DISA ID (US) andrew.k.zimmerman4.ctr@mail.mil; Author author@noreply.github.com Subject: [Non-DoD Source] Re: [ghoneycutt/puppet-module-ssh] ssh module custom fact error (#249)

All active links contained in this email were disabled. Please verify the identity of the sender, and confirm the authenticity of all links contained within the message prior to copying and pasting the address to a Web browser.


What's the output of ssh -V

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < Caution-https://github.com/ghoneycutt/puppet-module-ssh/issues/249#issuecomment-334182258 > , or mute the thread < Caution-https://github.com/notifications/unsubscribe-auth/AfAdkvnBLonFavC_5VYp5ubkaOE23m6Yks5so5v4gaJpZM4Ptf0t > . <Caution-https://github.com/notifications/beacon/AfAdksTA1qUnGhBe4kvyvxKnuRvIsxu0ks5so5v4gaJpZM4Ptf0t.gif>

ghoneycutt commented 7 years ago

I am unable to reproduce the error. It seems that the fact is not resolving correctly, though I tested with the string you provided and the facts ssh_version and ssh_version_numeric resolved as expected.

Are you using the latest version of this module?

andrewkzimmerman commented 7 years ago

Using ghoneycutt-ssh-3.55.0.tar.gz downloaded 9/29/2017

ghoneycutt commented 7 years ago

What platform are you running on? How could I reproduce this issue?

andrewkzimmerman commented 7 years ago

I am using PE 2017.2 on RHEL7 with clients on RHEL 6.9.

I see in the init.pp ssh_version_numeric is in an if statement. I can also see it is in spec/classes/init_spec.rb and spec/unit/facter/ssh_spec.rb and in lib/facter/ssh.rb. What code is actually running the check on the client and then passing the string on? If I get that I can probably find the issue.

andrewkzimmerman commented 7 years ago

If I can't resolve the issue today I will uninstall and reinstall the module to see If I get a different result.

andrewkzimmerman commented 7 years ago

I uninstalled and reinstalled then ran the agent on the client. It ran through this time, but It did still output the same error in the output when the agent ran. But the deployment of the puppet configured file was set on the client. I guess the issue can be closed.