Showing with 99 additions and 145 deletions.
  1. +1 −1 .fixtures.yml
  2. +41 −87 .travis.yml
  3. +25 −20 Gemfile
  4. +4 −3 README.md
  5. +3 −9 Rakefile
  6. +2 −2 metadata.json
  7. +23 −23 spec/classes/init_spec.rb
2 changes: 1 addition & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ fixtures:
ref: 'v1.4.1'
firewall:
repo: 'https://github.com/puppetlabs/puppetlabs-firewall.git'
ref: '0.2.1'
ref: '1.9.0'
symlinks:
ssh: "#{source_dir}"
128 changes: 41 additions & 87 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,101 +1,55 @@
---
language: ruby

rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.0
- 2.3.1
cache: bundler

env:
matrix:
- PUPPET_GEM_VERSION="~> 3.1.0"
- PUPPET_GEM_VERSION="~> 3.2.0"
- PUPPET_GEM_VERSION="~> 3.3.0"
- PUPPET_GEM_VERSION="~> 3.4.0"
- PUPPET_GEM_VERSION="~> 3.5.0"
- PUPPET_GEM_VERSION="~> 3.6.0"
- PUPPET_GEM_VERSION="~> 3.7.0"
- PUPPET_GEM_VERSION="~> 3.8.0"
- PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
- PUPPET_GEM_VERSION="~> 4.0.0"
- PUPPET_GEM_VERSION="~> 4.1.0"
- PUPPET_GEM_VERSION="~> 4.2.0"
- PUPPET_GEM_VERSION="~> 4.3.0"
- PUPPET_GEM_VERSION="~> 4.4.0"
- PUPPET_GEM_VERSION="~> 4.5.0"
- PUPPET_GEM_VERSION="~> 4.6.0"
- PUPPET_GEM_VERSION="~> 4.7.0"
- PUPPET_GEM_VERSION="~> 4.8.0"
- PUPPET_GEM_VERSION="~> 4.9.0"
- PUPPET_GEM_VERSION="~> 4"
before_install:
- bundle -v
- rm Gemfile.lock || true
- gem update --system
- gem update bundler
- gem --version
- bundle -v

sudo: false

script: 'SPEC_OPTS="--format documentation" bundle exec rake validate lint spec'

matrix:
fast_finish: true
exclude:
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.1.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.1.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.2.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.3.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.4.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.0.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.1.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.2.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.3.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.4.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.5.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.6.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.7.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.8.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4.9.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 4.9.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 4.9.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 4"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 4"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 4"
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3.1.0"
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3.2.0"
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3.3.0"
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3.4.0"
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3.5.0"
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3.6.0"
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3.7.0"
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3.8.0"
- rvm: 2.3.1
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
include:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 3"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 3"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.6.0"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.7.0"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.8.0"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.9.0"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.10.0"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4"
- rvm: 2.4.1
env: PUPPET_GEM_VERSION="~> 5.0.0"
- rvm: 2.4.1
env: PUPPET_GEM_VERSION="~> 5"

notifications:
email: false
45 changes: 25 additions & 20 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,33 @@ else
gem 'puppet', :require => false
end

gem 'facter', '>= 1.7.0'
gem 'rspec-puppet', '~> 2.0'
gem 'puppet-lint', '~> 2.0'
gem 'puppet-lint-absolute_classname-check'
gem 'puppet-lint-alias-check'
gem 'puppet-lint-empty_string-check'
gem 'puppet-lint-file_ensure-check'
gem 'puppet-lint-file_source_rights-check'
gem 'puppet-lint-leading_zero-check'
gem 'puppet-lint-spaceship_operator_without_tag-check'
gem 'puppet-lint-trailing_comma-check'
gem 'puppet-lint-undef_in_function-check'
gem 'puppet-lint-unquoted_string-check'
gem 'puppet-lint-variable_contains_upcase'
gem 'facter', '>= 1.7.0', :require => false
gem 'rspec-puppet', '>= 2.4.0', :require => false
gem 'puppet-lint', '~> 2.0', :require => false
gem 'puppet-lint-absolute_classname-check', :require => false
gem 'puppet-lint-alias-check', :require => false
gem 'puppet-lint-empty_string-check', :require => false
gem 'puppet-lint-file_ensure-check', :require => false
gem 'puppet-lint-file_source_rights-check', :require => false
gem 'puppet-lint-leading_zero-check', :require => false
gem 'puppet-lint-spaceship_operator_without_tag-check', :require => false
gem 'puppet-lint-trailing_comma-check', :require => false
gem 'puppet-lint-undef_in_function-check', :require => false
gem 'puppet-lint-unquoted_string-check', :require => false
gem 'puppet-lint-variable_contains_upcase', :require => false

gem 'rspec', '~> 2.0' if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'rake', '~> 10.0' if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'json', '<= 1.8' if RUBY_VERSION < '2.0.0'
gem 'json_pure', '<= 2.0.1' if RUBY_VERSION < '2.0.0'
gem 'metadata-json-lint', '0.0.11' if RUBY_VERSION < '1.9'
gem 'metadata-json-lint' if RUBY_VERSION >= '1.9'
gem 'rspec', '~> 2.0', :require => false if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'rake', '~> 10.0', :require => false if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'json', '<= 1.8', :require => false if RUBY_VERSION < '2.0.0'
gem 'json_pure', '<= 2.0.1', :require => false if RUBY_VERSION < '2.0.0'
gem 'metadata-json-lint', '0.0.11' if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'metadata-json-lint', '1.0.0' if RUBY_VERSION >= '1.9' && RUBY_VERSION < '2.0'
gem 'metadata-json-lint' if RUBY_VERSION >= '2.0'

gem 'puppetlabs_spec_helper', '2.0.2', :require => false if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
gem 'puppetlabs_spec_helper', '>= 2.0.0', :require => false if RUBY_VERSION >= '1.9'
gem 'parallel_tests', '<= 2.9.0', :require => false if RUBY_VERSION < '2.0.0'

if puppetversion < '5.0'
gem 'semantic_puppet', :require => false
end
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ This module may be used with a simple `include ::ssh`

# Compatibility

This module has been tested to work on the following systems with Puppet
versions v3, v3 with future parser and v4 with Ruby versions 1.8.7 (Puppet v3
only), 1.9.3, 2.0.0, 2.1.0 and 2.3.1 (Puppet v4 only).
This module has been tested to work on the following systems with the
latest Puppet v3, v3 with future parser, last few releases of v4 and
Puppet v5. See .travis.yml for the exact matrix of supported Puppet and
ruby versions.

* Debian 7
* EL 5
Expand Down
12 changes: 3 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,11 @@ require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_140chars')
PuppetLint.configuration.relative = true
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
PuppetLint.configuration.ignore_paths = ['spec/**/*.pp', 'pkg/**/*.pp', 'vendor/**/*.pp']

desc 'Validate manifests, templates, and ruby files'
desc 'Validate manifests, templates, ruby files and shell scripts'
task :validate do
Dir['manifests/**/*.pp'].each do |manifest|
sh "puppet parser validate --noop #{manifest}"
end
Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file|
Dir['spec/**/*.rb', 'lib/**/*.rb'].each do |ruby_file|
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
end
Dir['templates/**/*.erb'].each do |template|
sh "erb -P -x -T '-' #{template} | ruby -c"
end
end
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">= 3.0.0 < 5.0.0"
"version_requirement": ">= 3.0.0 < 6.0.0"
}
],
"operatingsystem_support": [
Expand Down Expand Up @@ -89,6 +89,6 @@
"dependencies": [
{"name":"puppetlabs/stdlib","version_requirement":">= 4.6.0 < 6.0.0"},
{"name":"ghoneycutt/common","version_requirement":">= 1.4.1 < 2.0.0"},
{"name":"puppetlabs/firewall","version_requirement":">= 0.2.1 < 2.0.0"}
{"name":"puppetlabs/firewall","version_requirement":">= 1.9.0 < 2.0.0"}
]
}
46 changes: 23 additions & 23 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -327,22 +327,22 @@
'aes256-cbc',
],
:ssh_config_kexalgorithms => [ 'curve25519-sha256@libssh.org',
'ecdh-sha2-nistp256',
'ecdh-sha2-nistp384',
'ecdh-sha2-nistp521',
'diffie-hellman-group-exchange-sha256',
'diffie-hellman-group-exchange-sha1',
'diffie-hellman-group14-sha1',
'diffie-hellman-group1-sha1',
],
'ecdh-sha2-nistp256',
'ecdh-sha2-nistp384',
'ecdh-sha2-nistp521',
'diffie-hellman-group-exchange-sha256',
'diffie-hellman-group-exchange-sha1',
'diffie-hellman-group14-sha1',
'diffie-hellman-group1-sha1',
],
:ssh_config_macs => [ 'hmac-md5-etm@openssh.com',
'hmac-sha1-etm@openssh.com',
],
:ssh_config_proxy_command => 'ssh -W %h:%p firewall.example.org',
:ssh_config_global_known_hosts_file => '/etc/ssh/ssh_known_hosts2',
:ssh_config_global_known_hosts_list => [ '/etc/ssh/ssh_known_hosts3',
'/etc/ssh/ssh_known_hosts4',
],
'/etc/ssh/ssh_known_hosts4',
],
:ssh_config_user_known_hosts_file => [ '.ssh/known_hosts1',
'.ssh/known_hosts2',
],
Expand Down Expand Up @@ -398,7 +398,7 @@
:sshd_config_match => { 'User JohnDoe' => [ 'AllowTcpForwarding yes', ], },
:sshd_config_challenge_resp_auth => 'no',
:sshd_config_print_motd => 'no',
:sshd_config_print_last_log => 'no',
:sshd_config_print_last_log => 'no',
:sshd_config_use_dns => 'no',
:sshd_config_banner => '/etc/sshd_banner',
:sshd_authorized_keys_command => '/path/to/command',
Expand All @@ -410,7 +410,7 @@
:sshd_password_authentication => 'no',
:sshd_config_permitemptypasswords => 'no',
:sshd_config_permituserenvironment => 'no',
:sshd_config_compression => 'no',
:sshd_config_compression => 'no',
:sshd_pubkeyacceptedkeytypes => [ 'ecdsa-sha2-nistp256',
'ecdsa-sha2-nistp384',
'ecdsa-sha2-nistp521',
Expand Down Expand Up @@ -439,14 +439,14 @@
'aes256-cbc',
],
:sshd_config_kexalgorithms => [ 'curve25519-sha256@libssh.org',
'ecdh-sha2-nistp256',
'ecdh-sha2-nistp384',
'ecdh-sha2-nistp521',
'diffie-hellman-group-exchange-sha256',
'diffie-hellman-group-exchange-sha1',
'diffie-hellman-group14-sha1',
'diffie-hellman-group1-sha1',
],
'ecdh-sha2-nistp256',
'ecdh-sha2-nistp384',
'ecdh-sha2-nistp521',
'diffie-hellman-group-exchange-sha256',
'diffie-hellman-group-exchange-sha1',
'diffie-hellman-group14-sha1',
'diffie-hellman-group1-sha1',
],
:sshd_config_macs => [ 'hmac-md5-etm@openssh.com',
'hmac-sha1-etm@openssh.com',
],
Expand All @@ -466,7 +466,7 @@
'2001:db8::dead:f00d',
],
:sshd_config_tcp_keepalive => 'yes',
:sshd_config_use_privilege_separation => 'no',
:sshd_config_use_privilege_separation => 'no',
:sshd_config_permittunnel => 'no',
}
end
Expand Down Expand Up @@ -992,7 +992,7 @@
end
end
end

describe 'sshd_config_compression param' do
['yes','no','delayed'].each do |value|
context "set to #{value}" do
Expand Down Expand Up @@ -2437,7 +2437,7 @@
end
end
end

describe 'sshd_config_use_privilege_separation param' do
['yes','no','sandbox'].each do |value|
context "set to #{value}" do
Expand Down