Skip to content

Instantly share code, notes, and snippets.

@stevebanik
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevebanik/b4e2dd7d821d0b25767b to your computer and use it in GitHub Desktop.
Save stevebanik/b4e2dd7d821d0b25767b to your computer and use it in GitHub Desktop.
# This file is being maintained by Puppet.
# DO NOT EDIT
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict -6 ::1
<% ntpServerList.each do |ntpServer| -%>
server <%= ntpServer %> iburst
<% end -%>
# Drift file. Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /var/lib/ntp/drift
Error: Failed to parse template ntp/client-ntp.conf.erb:
Filepath: /usr/lib/ruby/site_ruby/1.8/puppet/parser/scope.rb
Line: 435
Detail: Undefined variable "ntpServerList"
at /etc/puppet/modules/ntp/manifests/init.pp:19 on node puppet.example.com
Error: Failed to parse template ntp/client-ntp.conf.erb:
Filepath: /usr/lib/ruby/site_ruby/1.8/puppet/parser/scope.rb
Line: 435
Detail: Undefined variable "ntpServerList"
at /etc/puppet/modules/ntp/manifests/init.pp:19 on node puppet.example.com
import "templates"
class toolbox {
file { '/usr/local/sbin/puppetsimple.sh' :
owner => root, group => root, mode => 0755,
content => "#!/bin/sh\npuppet agent --onetime --no-daemonize --verbose \n",
} #file
} #class
node 'puppet.example.com' {
include toolbox
} #node
# local ntp servers
$ntpServerList = [ '192.168.200.75', '192.168.200.78' ]
$ntpAllowedSubnets = ['192.168.200.0 mask 255.255.252.0', '192.168.100.0 mask 255.255.255.0']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment