commit
4cf13caf74
@ -8,6 +8,6 @@ fixtures:
|
|||||||
ref: 'v1.4.1'
|
ref: 'v1.4.1'
|
||||||
firewall:
|
firewall:
|
||||||
repo: 'https://github.com/puppetlabs/puppetlabs-firewall.git'
|
repo: 'https://github.com/puppetlabs/puppetlabs-firewall.git'
|
||||||
ref: '0.2.1'
|
ref: '1.9.0'
|
||||||
symlinks:
|
symlinks:
|
||||||
ssh: "#{source_dir}"
|
ssh: "#{source_dir}"
|
||||||
|
128
.travis.yml
128
.travis.yml
@ -1,35 +1,15 @@
|
|||||||
---
|
---
|
||||||
language: ruby
|
language: ruby
|
||||||
|
|
||||||
rvm:
|
cache: bundler
|
||||||
- 1.8.7
|
|
||||||
- 1.9.3
|
|
||||||
- 2.0.0
|
|
||||||
- 2.1.0
|
|
||||||
- 2.3.1
|
|
||||||
|
|
||||||
env:
|
before_install:
|
||||||
matrix:
|
- bundle -v
|
||||||
- PUPPET_GEM_VERSION="~> 3.1.0"
|
- rm Gemfile.lock || true
|
||||||
- PUPPET_GEM_VERSION="~> 3.2.0"
|
- gem update --system
|
||||||
- PUPPET_GEM_VERSION="~> 3.3.0"
|
- gem update bundler
|
||||||
- PUPPET_GEM_VERSION="~> 3.4.0"
|
- gem --version
|
||||||
- PUPPET_GEM_VERSION="~> 3.5.0"
|
- bundle -v
|
||||||
- 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"
|
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
@ -37,65 +17,39 @@ script: 'SPEC_OPTS="--format documentation" bundle exec rake validate lint spec'
|
|||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
exclude:
|
include:
|
||||||
- rvm: 2.0.0
|
- rvm: 1.8.7
|
||||||
env: PUPPET_GEM_VERSION="~> 3.1.0"
|
env: PUPPET_GEM_VERSION="~> 3"
|
||||||
- rvm: 2.1.0
|
- rvm: 1.8.7
|
||||||
env: PUPPET_GEM_VERSION="~> 3.1.0"
|
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
|
||||||
- rvm: 2.1.0
|
- rvm: 1.9.3
|
||||||
env: PUPPET_GEM_VERSION="~> 3.2.0"
|
env: PUPPET_GEM_VERSION="~> 3"
|
||||||
- rvm: 2.1.0
|
- rvm: 1.9.3
|
||||||
env: PUPPET_GEM_VERSION="~> 3.3.0"
|
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
|
||||||
- rvm: 2.1.0
|
- rvm: 2.0.0
|
||||||
env: PUPPET_GEM_VERSION="~> 3.4.0"
|
env: PUPPET_GEM_VERSION="~> 3"
|
||||||
- rvm: 1.8.7
|
- rvm: 2.0.0
|
||||||
env: PUPPET_GEM_VERSION="~> 4.0.0"
|
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
|
||||||
- rvm: 1.8.7
|
- rvm: 2.1.9
|
||||||
env: PUPPET_GEM_VERSION="~> 4.1.0"
|
env: PUPPET_GEM_VERSION="~> 3"
|
||||||
- rvm: 1.8.7
|
- rvm: 2.1.9
|
||||||
env: PUPPET_GEM_VERSION="~> 4.2.0"
|
env: PUPPET_GEM_VERSION="~> 3" FUTURE_PARSER="yes"
|
||||||
- rvm: 1.8.7
|
- rvm: 2.1.9
|
||||||
env: PUPPET_GEM_VERSION="~> 4.3.0"
|
env: PUPPET_GEM_VERSION="~> 4.6.0"
|
||||||
- rvm: 1.8.7
|
- rvm: 2.1.9
|
||||||
env: PUPPET_GEM_VERSION="~> 4.4.0"
|
env: PUPPET_GEM_VERSION="~> 4.7.0"
|
||||||
- rvm: 1.8.7
|
- rvm: 2.1.9
|
||||||
env: PUPPET_GEM_VERSION="~> 4.5.0"
|
env: PUPPET_GEM_VERSION="~> 4.8.0"
|
||||||
- rvm: 1.8.7
|
- rvm: 2.1.9
|
||||||
env: PUPPET_GEM_VERSION="~> 4.6.0"
|
env: PUPPET_GEM_VERSION="~> 4.9.0"
|
||||||
- rvm: 1.8.7
|
- rvm: 2.1.9
|
||||||
env: PUPPET_GEM_VERSION="~> 4.7.0"
|
env: PUPPET_GEM_VERSION="~> 4.10.0"
|
||||||
- rvm: 1.8.7
|
- rvm: 2.1.9
|
||||||
env: PUPPET_GEM_VERSION="~> 4.8.0"
|
env: PUPPET_GEM_VERSION="~> 4"
|
||||||
- rvm: 1.8.7
|
- rvm: 2.4.1
|
||||||
env: PUPPET_GEM_VERSION="~> 4.9.0"
|
env: PUPPET_GEM_VERSION="~> 5.0.0"
|
||||||
- rvm: 1.9.3
|
- rvm: 2.4.1
|
||||||
env: PUPPET_GEM_VERSION="~> 4.9.0"
|
env: PUPPET_GEM_VERSION="~> 5"
|
||||||
- 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"
|
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
45
Gemfile
45
Gemfile
@ -6,28 +6,33 @@ else
|
|||||||
gem 'puppet', :require => false
|
gem 'puppet', :require => false
|
||||||
end
|
end
|
||||||
|
|
||||||
gem 'facter', '>= 1.7.0'
|
gem 'facter', '>= 1.7.0', :require => false
|
||||||
gem 'rspec-puppet', '~> 2.0'
|
gem 'rspec-puppet', '>= 2.4.0', :require => false
|
||||||
gem 'puppet-lint', '~> 2.0'
|
gem 'puppet-lint', '~> 2.0', :require => false
|
||||||
gem 'puppet-lint-absolute_classname-check'
|
gem 'puppet-lint-absolute_classname-check', :require => false
|
||||||
gem 'puppet-lint-alias-check'
|
gem 'puppet-lint-alias-check', :require => false
|
||||||
gem 'puppet-lint-empty_string-check'
|
gem 'puppet-lint-empty_string-check', :require => false
|
||||||
gem 'puppet-lint-file_ensure-check'
|
gem 'puppet-lint-file_ensure-check', :require => false
|
||||||
gem 'puppet-lint-file_source_rights-check'
|
gem 'puppet-lint-file_source_rights-check', :require => false
|
||||||
gem 'puppet-lint-leading_zero-check'
|
gem 'puppet-lint-leading_zero-check', :require => false
|
||||||
gem 'puppet-lint-spaceship_operator_without_tag-check'
|
gem 'puppet-lint-spaceship_operator_without_tag-check', :require => false
|
||||||
gem 'puppet-lint-trailing_comma-check'
|
gem 'puppet-lint-trailing_comma-check', :require => false
|
||||||
gem 'puppet-lint-undef_in_function-check'
|
gem 'puppet-lint-undef_in_function-check', :require => false
|
||||||
gem 'puppet-lint-unquoted_string-check'
|
gem 'puppet-lint-unquoted_string-check', :require => false
|
||||||
gem 'puppet-lint-variable_contains_upcase'
|
gem 'puppet-lint-variable_contains_upcase', :require => false
|
||||||
|
|
||||||
gem 'rspec', '~> 2.0' if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
|
gem 'rspec', '~> 2.0', :require => false 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 'rake', '~> 10.0', :require => false if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
|
||||||
gem 'json', '<= 1.8' if RUBY_VERSION < '2.0.0'
|
gem 'json', '<= 1.8', :require => false if RUBY_VERSION < '2.0.0'
|
||||||
gem 'json_pure', '<= 2.0.1' 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.9'
|
gem 'metadata-json-lint', '0.0.11' if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
|
||||||
gem 'metadata-json-lint' if 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.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 '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'
|
gem 'parallel_tests', '<= 2.9.0', :require => false if RUBY_VERSION < '2.0.0'
|
||||||
|
|
||||||
|
if puppetversion < '5.0'
|
||||||
|
gem 'semantic_puppet', :require => false
|
||||||
|
end
|
||||||
|
@ -19,9 +19,10 @@ This module may be used with a simple `include ::ssh`
|
|||||||
|
|
||||||
# Compatibility
|
# Compatibility
|
||||||
|
|
||||||
This module has been tested to work on the following systems with Puppet
|
This module has been tested to work on the following systems with the
|
||||||
versions v3, v3 with future parser and v4 with Ruby versions 1.8.7 (Puppet v3
|
latest Puppet v3, v3 with future parser, last few releases of v4 and
|
||||||
only), 1.9.3, 2.0.0, 2.1.0 and 2.3.1 (Puppet v4 only).
|
Puppet v5. See .travis.yml for the exact matrix of supported Puppet and
|
||||||
|
ruby versions.
|
||||||
|
|
||||||
* Debian 7
|
* Debian 7
|
||||||
* EL 5
|
* EL 5
|
||||||
|
12
Rakefile
12
Rakefile
@ -3,17 +3,11 @@ require 'puppet-lint/tasks/puppet-lint'
|
|||||||
PuppetLint.configuration.send('disable_80chars')
|
PuppetLint.configuration.send('disable_80chars')
|
||||||
PuppetLint.configuration.send('disable_140chars')
|
PuppetLint.configuration.send('disable_140chars')
|
||||||
PuppetLint.configuration.relative = true
|
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
|
task :validate do
|
||||||
Dir['manifests/**/*.pp'].each do |manifest|
|
Dir['spec/**/*.rb', 'lib/**/*.rb'].each do |ruby_file|
|
||||||
sh "puppet parser validate --noop #{manifest}"
|
|
||||||
end
|
|
||||||
Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file|
|
|
||||||
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
|
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
|
||||||
end
|
end
|
||||||
Dir['templates/**/*.erb'].each do |template|
|
|
||||||
sh "erb -P -x -T '-' #{template} | ruby -c"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
"requirements": [
|
"requirements": [
|
||||||
{
|
{
|
||||||
"name": "puppet",
|
"name": "puppet",
|
||||||
"version_requirement": ">= 3.0.0 < 5.0.0"
|
"version_requirement": ">= 3.0.0 < 6.0.0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"operatingsystem_support": [
|
"operatingsystem_support": [
|
||||||
@ -89,6 +89,6 @@
|
|||||||
"dependencies": [
|
"dependencies": [
|
||||||
{"name":"puppetlabs/stdlib","version_requirement":">= 4.6.0 < 6.0.0"},
|
{"name":"puppetlabs/stdlib","version_requirement":">= 4.6.0 < 6.0.0"},
|
||||||
{"name":"ghoneycutt/common","version_requirement":">= 1.4.1 < 2.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"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -327,22 +327,22 @@ describe 'ssh' do
|
|||||||
'aes256-cbc',
|
'aes256-cbc',
|
||||||
],
|
],
|
||||||
:ssh_config_kexalgorithms => [ 'curve25519-sha256@libssh.org',
|
:ssh_config_kexalgorithms => [ 'curve25519-sha256@libssh.org',
|
||||||
'ecdh-sha2-nistp256',
|
'ecdh-sha2-nistp256',
|
||||||
'ecdh-sha2-nistp384',
|
'ecdh-sha2-nistp384',
|
||||||
'ecdh-sha2-nistp521',
|
'ecdh-sha2-nistp521',
|
||||||
'diffie-hellman-group-exchange-sha256',
|
'diffie-hellman-group-exchange-sha256',
|
||||||
'diffie-hellman-group-exchange-sha1',
|
'diffie-hellman-group-exchange-sha1',
|
||||||
'diffie-hellman-group14-sha1',
|
'diffie-hellman-group14-sha1',
|
||||||
'diffie-hellman-group1-sha1',
|
'diffie-hellman-group1-sha1',
|
||||||
],
|
],
|
||||||
:ssh_config_macs => [ 'hmac-md5-etm@openssh.com',
|
:ssh_config_macs => [ 'hmac-md5-etm@openssh.com',
|
||||||
'hmac-sha1-etm@openssh.com',
|
'hmac-sha1-etm@openssh.com',
|
||||||
],
|
],
|
||||||
:ssh_config_proxy_command => 'ssh -W %h:%p firewall.example.org',
|
: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_file => '/etc/ssh/ssh_known_hosts2',
|
||||||
:ssh_config_global_known_hosts_list => [ '/etc/ssh/ssh_known_hosts3',
|
: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_config_user_known_hosts_file => [ '.ssh/known_hosts1',
|
||||||
'.ssh/known_hosts2',
|
'.ssh/known_hosts2',
|
||||||
],
|
],
|
||||||
@ -398,7 +398,7 @@ describe 'ssh' do
|
|||||||
:sshd_config_match => { 'User JohnDoe' => [ 'AllowTcpForwarding yes', ], },
|
:sshd_config_match => { 'User JohnDoe' => [ 'AllowTcpForwarding yes', ], },
|
||||||
:sshd_config_challenge_resp_auth => 'no',
|
:sshd_config_challenge_resp_auth => 'no',
|
||||||
:sshd_config_print_motd => '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_use_dns => 'no',
|
||||||
:sshd_config_banner => '/etc/sshd_banner',
|
:sshd_config_banner => '/etc/sshd_banner',
|
||||||
:sshd_authorized_keys_command => '/path/to/command',
|
:sshd_authorized_keys_command => '/path/to/command',
|
||||||
@ -410,7 +410,7 @@ describe 'ssh' do
|
|||||||
:sshd_password_authentication => 'no',
|
:sshd_password_authentication => 'no',
|
||||||
:sshd_config_permitemptypasswords => 'no',
|
:sshd_config_permitemptypasswords => 'no',
|
||||||
:sshd_config_permituserenvironment => 'no',
|
:sshd_config_permituserenvironment => 'no',
|
||||||
:sshd_config_compression => 'no',
|
:sshd_config_compression => 'no',
|
||||||
:sshd_pubkeyacceptedkeytypes => [ 'ecdsa-sha2-nistp256',
|
:sshd_pubkeyacceptedkeytypes => [ 'ecdsa-sha2-nistp256',
|
||||||
'ecdsa-sha2-nistp384',
|
'ecdsa-sha2-nistp384',
|
||||||
'ecdsa-sha2-nistp521',
|
'ecdsa-sha2-nistp521',
|
||||||
@ -439,14 +439,14 @@ describe 'ssh' do
|
|||||||
'aes256-cbc',
|
'aes256-cbc',
|
||||||
],
|
],
|
||||||
:sshd_config_kexalgorithms => [ 'curve25519-sha256@libssh.org',
|
:sshd_config_kexalgorithms => [ 'curve25519-sha256@libssh.org',
|
||||||
'ecdh-sha2-nistp256',
|
'ecdh-sha2-nistp256',
|
||||||
'ecdh-sha2-nistp384',
|
'ecdh-sha2-nistp384',
|
||||||
'ecdh-sha2-nistp521',
|
'ecdh-sha2-nistp521',
|
||||||
'diffie-hellman-group-exchange-sha256',
|
'diffie-hellman-group-exchange-sha256',
|
||||||
'diffie-hellman-group-exchange-sha1',
|
'diffie-hellman-group-exchange-sha1',
|
||||||
'diffie-hellman-group14-sha1',
|
'diffie-hellman-group14-sha1',
|
||||||
'diffie-hellman-group1-sha1',
|
'diffie-hellman-group1-sha1',
|
||||||
],
|
],
|
||||||
:sshd_config_macs => [ 'hmac-md5-etm@openssh.com',
|
:sshd_config_macs => [ 'hmac-md5-etm@openssh.com',
|
||||||
'hmac-sha1-etm@openssh.com',
|
'hmac-sha1-etm@openssh.com',
|
||||||
],
|
],
|
||||||
@ -466,7 +466,7 @@ describe 'ssh' do
|
|||||||
'2001:db8::dead:f00d',
|
'2001:db8::dead:f00d',
|
||||||
],
|
],
|
||||||
:sshd_config_tcp_keepalive => 'yes',
|
:sshd_config_tcp_keepalive => 'yes',
|
||||||
:sshd_config_use_privilege_separation => 'no',
|
:sshd_config_use_privilege_separation => 'no',
|
||||||
:sshd_config_permittunnel => 'no',
|
:sshd_config_permittunnel => 'no',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -992,7 +992,7 @@ describe 'sshd_config_print_last_log param' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'sshd_config_compression param' do
|
describe 'sshd_config_compression param' do
|
||||||
['yes','no','delayed'].each do |value|
|
['yes','no','delayed'].each do |value|
|
||||||
context "set to #{value}" do
|
context "set to #{value}" do
|
||||||
@ -2437,7 +2437,7 @@ describe 'sshd_config_print_last_log param' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'sshd_config_use_privilege_separation param' do
|
describe 'sshd_config_use_privilege_separation param' do
|
||||||
['yes','no','sandbox'].each do |value|
|
['yes','no','sandbox'].each do |value|
|
||||||
context "set to #{value}" do
|
context "set to #{value}" do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user