Skip to content

Commit

Permalink
Merge pull request #196 from mhaskel/test
Browse files Browse the repository at this point in the history
Merge 3.1.x into master
  • Loading branch information
hunner committed Sep 5, 2014
2 parents b106ef3 + a493478 commit 973f07e
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 48 deletions.
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
##2014-05-14 - Supported Release 3.1.0
##2014-06-06 - Release 3.1.2
###Summary

This is a supported release. This release fixes a manifest typo.

##2014-06-06 - Release 3.1.1
###Summary

This is a bugfix release to get around dependency issues in PMT 3.6. This
version has a dependency on puppetlabs-stdlib >= 4 so PE3.2.x is no longer
supported.

####Bugfixes
- Remove deprecated Modulefile as it was causing duplicate dependencies with PMT.

##2014-05-14 - Release 3.1.0
###Summary
This is a supported release.

This release adds `disable_monitor` so you can disable the monitor functionality
of NTP, which was recently used in NTP amplification attacks. It also adds
Expand Down
11 changes: 0 additions & 11 deletions Modulefile

This file was deleted.

46 changes: 22 additions & 24 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@
default => true,
}

$default_config = '/etc/ntp.conf'
$default_keys_file = '/etc/ntp/keys'
$default_driftfile = '/var/lib/ntp/drift'
$default_package_name = ['ntp']
$default_service_name = 'ntpd'

case $::osfamily {
'AIX': {
$config = '/etc/ntp.conf'
$keysfile = '/etc/ntp.keys'
$keys_file = '/etc/ntp.keys'
$driftfile = '/etc/ntp.drift'
$package_name = [ 'bos.net.tcp.client' ]
$restrict = [
Expand All @@ -42,10 +48,6 @@
]
}
'Debian': {
$config = '/etc/ntp.conf'
$keys_file = '/etc/ntp/keys'
$driftfile = '/var/lib/ntp/drift'
$package_name = [ 'ntp' ]
$restrict = [
'default kod nomodify notrap nopeer noquery',
'-6 default kod nomodify notrap nopeer noquery',
Expand All @@ -62,10 +64,6 @@
]
}
'RedHat': {
$config = '/etc/ntp.conf'
$driftfile = '/var/lib/ntp/drift'
$keys_file = '/etc/ntp/keys'
$package_name = [ 'ntp' ]
$restrict = [
'default kod nomodify notrap nopeer noquery',
'-6 default kod nomodify notrap nopeer noquery',
Expand All @@ -81,10 +79,7 @@
]
}
'SuSE': {
$config = '/etc/ntp.conf'
$driftfile = '/var/lib/ntp/drift/ntp.drift'
$keys_file = '/etc/ntp/keys'
$package_name = [ 'ntp' ]
$restrict = [
'default kod nomodify notrap nopeer noquery',
'-6 default kod nomodify notrap nopeer noquery',
Expand All @@ -101,9 +96,7 @@
]
}
'FreeBSD': {
$config = '/etc/ntp.conf'
$driftfile = '/var/db/ntpd.drift'
$keys_file = '/etc/ntp/keys'
$package_name = ['net/ntp']
$restrict = [
'default kod nomodify notrap nopeer noquery',
Expand All @@ -121,10 +114,6 @@
]
}
'Archlinux': {
$config = '/etc/ntp.conf'
$driftfile = '/var/lib/ntp/drift'
$keys_file = '/etc/ntp/keys'
$package_name = [ 'ntp' ]
$restrict = [
'default kod nomodify notrap nopeer noquery',
'-6 default kod nomodify notrap nopeer noquery',
Expand Down Expand Up @@ -164,9 +153,6 @@
}
# Gentoo was added as its own $::osfamily in Facter 1.7.0
'Gentoo': {
$config = '/etc/ntp.conf'
$driftfile = '/var/lib/ntp/drift'
$keys_file = '/etc/ntp/keys'
$package_name = ['net-misc/ntp']
$restrict = [
'default kod nomodify notrap nopeer noquery',
Expand All @@ -188,9 +174,6 @@
# Before Facter 1.7.0 Gentoo did not have its own $::osfamily
case $::operatingsystem {
'Gentoo': {
$config = '/etc/ntp.conf'
$driftfile = '/var/lib/ntp/drift'
$keys_file = '/etc/ntp/keys'
$package_name = ['net-misc/ntp']
$restrict = [
'default kod nomodify notrap nopeer noquery',
Expand All @@ -216,4 +199,19 @@
fail("The ${module_name} module is not supported on an ${::osfamily} based system.")
}
}
if $config == undef {
$config = $default_config
}
if $keys_file == undef {
$keys_file = $default_keys_file
}
if $driftfile == undef {
$driftfile = $default_driftfile
}
if $package_name == undef {
$package_name = $default_package_name
}
if $service_name == undef {
$service_name = $default_service_name
}
}
19 changes: 10 additions & 9 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"name": "puppetlabs-ntp",
"version": "3.1.2",
"author": "Puppet Labs",
"summary": "NTP Module",
"license": "Apache Version 2.0",
"source": "git://github.com/puppetlabs/puppetlabs-ntp",
"project_page": "http://github.com/puppetlabs/puppetlabs-ntp",
"issues_url": "https://github.com/puppetlabs/puppetlabs-ntp/issues",
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
Expand Down Expand Up @@ -69,25 +77,18 @@
"requirements": [
{
"name": "pe",
"version_requirement": ">= 3.2.0 < 3.4.0"
"version_requirement": "3.3.x"
},
{
"name": "puppet",
"version_requirement": "3.x"
}
],
"name": "puppetlabs-ntp",
"version": "3.1.0",
"source": "git://github.com/puppetlabs/puppetlabs-ntp",
"author": "Puppet Labs",
"license": "Apache Version 2.0",
"summary": "NTP Module",
"description": "NTP Module for Debian, Ubuntu, CentOS, RHEL, OEL, Fedora, FreeBSD, ArchLinux and Gentoo.",
"project_page": "http://github.com/puppetlabs/puppetlabs-ntp",
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 0.1.6"
"version_requirement": ">= 4.0.0"
}
]
}
7 changes: 5 additions & 2 deletions spec/acceptance/restrict_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
context 'should run successfully' do
it 'runs twice' do
pp = "class { 'ntp': restrict => ['test restrict']}"
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
2.times do
apply_manifest(pp, :catch_failures => true) do |r|
expect(r.stderr).not_to match(/error/i)
end
end
end
end

Expand Down

0 comments on commit 973f07e

Please sign in to comment.