Ask Your Question
0

SSH Module facter errors

asked 2016-06-10 13:51:08 -0500

cjones gravatar image

I'm new to Puppet, and I was just following the SSH quick start tutorial. I'd like to demonstrate the ability to configure sshd_config as part of a proof of concept.

I'm following the Puppetlabs SSH quick start guide, after adding the ssh class to PE, and running puppet agent -t on a Solaris client, I get the following errors. Also, even after removing that class from master I continue to get these errors when I run puppet agent -t on the client.

Error: Facter: error while resolving custom fact "ssh_client_version_full": undefined method `lines' for nil:NilClass
Error: Facter: error while resolving custom fact "ssh_client_version_major": undefined method `gsub' for nil:NilClass
Error: Facter: error while resolving custom fact "ssh_client_version_release": undefined method `gsub' for nil:NilClass
Error: Facter: error while resolving custom fact "ssh_server_version_full": undefined method `lines' for nil:NilClass
Error: Facter: error while resolving custom fact "ssh_server_version_major": undefined method `gsub' for nil:NilClass
Error: Facter: error while resolving custom fact "ssh_server_version_release": undefined method `gsub' for nil:NilClass
  1. I'd like to get the client back to a working error-free state. Is caching the issue? Anyway to clear this error up as the client should no longer need these modules (I assume so after removing the class from the master). Tips/tricks for resolving agent issues?

  2. I'd also like the POC to work. Any known issues with this module? There are some bug fixes reported online, however nothing leading me to a solution.

Thanks all

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-06-13 00:14:01 -0500

updated 2016-06-13 00:15:09 -0500

Hi there, it looks like the page you're following is old and has been forgotten about.

Since that page was written, the saz/ssh module has evidently been substantially refactored. Meanwhile, an "Approved" ssh module exists now at https://forge.puppet.com/ghoneycutt/ssh, and it's recommended that people use Approved or Supported modules where they exist and where they meet the requirements.

Your actual requirement, however, is a proof of concept for Puppet Enterprise. My suggestion is to substitute the Puppet Labs motd module and instead of PermitRootLogin => 'no' try to pass in to the motd module content => 'hello world'?

Aside from this, it also looks like your Puppet Master is broken, due to the fact that facts delivered by the ssh module aren't being found. However since I can't know the exact steps you followed to build the Puppet Master, it's hard to know what might be wrong. If it still doesn't work, ask another question this time documenting the exact steps you followed to build the Puppet Master.

edit flag offensive delete link more
0

answered 2016-06-13 12:12:55 -0500

cjones gravatar image

Thanks, I did find my way to the supporting operating systems for saz-ssh, and Solaris isn't one of them. Makes sense why it wasn't working. I resolved the errors by uninstalling the module from the client (as well as master).

I will try out the module you suggest, I was looking at it too. It's nice to get some reinforcement of the correct path to follow being I'm just starting out.

I have done the Hello World example. The bosses were not impressed :) The goal of the POC is to demonstrate that Puppet can at least provide the configuration management features we currently have. Hence the test of SSH server config.

Ensuring cron jobs are set and run is another good one I'll be tackling next.

Thanks for responding, appreciate your help.

edit flag offensive delete link more

Comments

Puppet has a native type for managing cron resources. Be sure to use that instead of trying to manage the cron config files manually!

DarylW gravatar imageDarylW ( 2016-06-13 17:24:33 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-06-10 13:51:08 -0500

Seen: 206 times

Last updated: Jun 13 '16