saz / puppet-ssh

Puppet module to manage ssh server and client

Home Page:http://forge.puppetlabs.com/saz/ssh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: confine kernel: %w[Linux SunOS FreeBSD DragonFly Darwin]

MyLive opened this issue · comments

Fix some faults in ssh_server_version.rb & ssh_client_version.rb

  • confine kernel: %w[Linux SunOS FreeBSD DragonFly Darwin]
  • confine :kernel => %w[Linux SunOS FreeBSD DragonFly Darwin]
  • confine kernel: %w[Linux SunOS FreeBSD DragonFly DragonFly Darwin]
  • confine ssh_server_version_full: %r{\d+}
  • confine :kernel => %w[Linux SunOS FreeBSD DragonFly DragonFly Darwin]
  • confine :ssh_server_version_full => %r{\d+}

with older python & puppet versions you get the error:
Error loading fact /var/lib/puppet/lib/facter/ssh_client_version.rb: /var/lib/puppet/lib/facter/ssh_client_version.rb:2: syntax error, unexpected ':', expecting kEND
confine kernel: %w[Linux SunOS FreeBSD DragonFly Darwin]
^
/var/lib/puppet/lib/facter/ssh_client_version.rb:19: syntax error, unexpected ':', expecting kEND
confine kernel: %w[Linux SunOS FreeBSD DragonFly Darwin]
^
/var/lib/puppet/lib/facter/ssh_client_version.rb:20: syntax error, unexpected ':', expecting kEND
confine ssh_client_version_full: true
^
/var/lib/puppet/lib/facter/ssh_client_version.rb:29: syntax error, unexpected ':', expecting kEND
confine kernel: %w[Linux SunOS FreeBSD DragonFly Darwin]
^
/var/lib/puppet/lib/facter/ssh_client_version.rb:30: syntax error, unexpected ':', expecting kEND
confine ssh_client_version_full: true
^
Error loading fact /var/lib/puppet/lib/facter/ssh_server_version.rb: /var/lib/puppet/lib/facter/ssh_server_version.rb:2: syntax error, unexpected ':', expecting kEND
confine kernel: %w[Linux SunOS FreeBSD DragonFly Darwin]
^
/var/lib/puppet/lib/facter/ssh_server_version.rb:22: syntax error, unexpected ':', expecting kEND
confine kernel: %w[Linux SunOS FreeBSD DragonFly DragonFly Darwin]
^
/var/lib/puppet/lib/facter/ssh_server_version.rb:23: syntax error, unexpected ':', expecting kEND
confine ssh_server_version_full: %r{\d+}
^
/var/lib/puppet/lib/facter/ssh_server_version.rb:39: syntax error, unexpected ':', expecting kEND

After the change it works fine :-)

Which version of ruby and puppet are you using?

Agent: 5.5.8-1bionic
Server: 5.3.6-1bionic

@MyLive Which ruby version?

facter rubysitedir rubyversion
rubysitedir => /opt/puppetlabs/puppet/lib/ruby/site_ruby/2.4.0
rubyversion => 2.4.4

@MyLive Those files are using the new hash syntax introduced with ruby 1.9.
This should'nt be an issue on puppet 4 and newer as those are relying on ruby 2.1 (or maybe newer).

Are you sure you're seeing the issue on ruby 2.4.4 with puppet 5?

Closing this, as there is no feedback and I don't think any change is required.