Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test #143

Merged
merged 4 commits into from Mar 21, 2014
Merged

Test #143

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 0 additions & 9 deletions .travis.yml
Expand Up @@ -5,9 +5,6 @@ branches:
language: ruby
bundler_args: --without development
script: "bundle exec rake spec SPEC_OPTS='--format documentation'"
after_success:
- git clone -q git://github.com/puppetlabs/ghpublisher.git .forge-releng
- .forge-releng/publish
rvm:
- 1.8.7
- 1.9.3
Expand All @@ -18,12 +15,6 @@ env:
- PUPPET_GEM_VERSION="~> 3.0.0"
- PUPPET_GEM_VERSION="~> 3.1.0"
- PUPPET_GEM_VERSION="~> 3.2.0"
global:
- PUBLISHER_LOGIN=puppetlabs
- secure: |-
ZiIkYd9+CdPzpwSjFPnVkCx1FIlipxpbdyD33q94h2Tj5zXjNb1GXizVy0NR
kVxGhU5Ld8y9z8DTqKRgCI1Yymg3H//OU++PKLOQj/X5juWVR4URBNPeBOzu
IJBDl1MADKA4i1+jAZPpz4mTvTtKS4pWKErgCSmhSfsY1hs7n6c=
matrix:
exclude:
- rvm: 1.9.3
Expand Down
52 changes: 46 additions & 6 deletions manifests/params.pp
Expand Up @@ -8,12 +8,6 @@
$keys_trusted = []
$package_ensure = 'present'
$preferred_servers = []
$restrict = [
'default kod nomodify notrap nopeer noquery',
'-6 default kod nomodify notrap nopeer noquery',
'127.0.0.1',
'-6 ::1',
]
$service_enable = true
$service_ensure = 'running'
$service_manage = true
Expand All @@ -31,6 +25,10 @@
$keysfile = '/etc/ntp.keys'
$driftfile = '/etc/ntp.drift'
$package_name = [ 'bos.net.tcp.client' ]
$restrict = [
'default nomodify notrap nopeer noquery',
'127.0.0.1',
]
$service_name = 'xntpd'
$servers = [
'0.debian.pool.ntp.org iburst',
Expand All @@ -44,6 +42,12 @@
$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',
'127.0.0.1',
'-6 ::1',
]
$service_name = 'ntp'
$servers = [
'0.debian.pool.ntp.org iburst',
Expand All @@ -57,6 +61,12 @@
$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',
'127.0.0.1',
'-6 ::1',
]
$service_name = 'ntpd'
$servers = [
'0.centos.pool.ntp.org',
Expand All @@ -69,6 +79,12 @@
$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',
'127.0.0.1',
'-6 ::1',
]
$service_name = 'ntp'
$servers = [
'0.opensuse.pool.ntp.org',
Expand All @@ -82,6 +98,12 @@
$driftfile = '/var/db/ntpd.drift'
$keys_file = '/etc/ntp/keys'
$package_name = ['net/ntp']
$restrict = [
'default kod nomodify notrap nopeer noquery',
'-6 default kod nomodify notrap nopeer noquery',
'127.0.0.1',
'-6 ::1',
]
$service_name = 'ntpd'
$servers = [
'0.freebsd.pool.ntp.org iburst maxpoll 9',
Expand All @@ -95,6 +117,12 @@
$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',
'127.0.0.1',
'-6 ::1',
]
$service_name = 'ntpd'
$servers = [
'0.pool.ntp.org',
Expand All @@ -108,6 +136,12 @@
$driftfile = '/var/lib/ntp/drift'
$keys_file = '/etc/ntp/keys'
$package_name = ['net-misc/ntp']
$restrict = [
'default kod nomodify notrap nopeer noquery',
'-6 default kod nomodify notrap nopeer noquery',
'127.0.0.1',
'-6 ::1',
]
$service_name = 'ntpd'
$servers = [
'0.gentoo.pool.ntp.org',
Expand All @@ -125,6 +159,12 @@
$driftfile = '/var/lib/ntp/drift'
$keys_file = '/etc/ntp/keys'
$package_name = ['net-misc/ntp']
$restrict = [
'default kod nomodify notrap nopeer noquery',
'-6 default kod nomodify notrap nopeer noquery',
'127.0.0.1',
'-6 ::1',
]
$service_name = 'ntpd'
$servers = [
'0.gentoo.pool.ntp.org',
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper_acceptance.rb
Expand Up @@ -27,7 +27,7 @@
# Install module and dependencies
puppet_module_install(:source => proj_root, :module_name => 'ntp')
hosts.each do |host|
shell("/bin/touch #{default['distmoduledir']}/hiera.yaml")
shell("/bin/touch #{default['puppetpath']}/hiera.yaml")
shell('puppet module install puppetlabs-stdlib', :acceptable_exit_codes => [0,1])
end
end
Expand Down
4 changes: 2 additions & 2 deletions templates/ntp.conf.erb
Expand Up @@ -7,8 +7,8 @@ tinker panic 0
<% end -%>

<% if @restrict != [] -%>
# Permit time synchronization with our time source, but do not'
# permit the source to query or modify the service on this system.'
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
<% @restrict.flatten.each do |restrict| -%>
restrict <%= restrict %>
<% end %>
Expand Down