Skip to content

Instantly share code, notes, and snippets.

@jblaine
Created September 20, 2012 21:34
Show Gist options
  • Save jblaine/3758494 to your computer and use it in GitHub Desktop.
Save jblaine/3758494 to your computer and use it in GitHub Desktop.
How do I get the ntp cookbook's default ntp[servers] to not be used? I am
specifying my own in my role. I do not want the defaults servers + mine.
I want mine only.
rcf-chef:rcf-linux-beta> knife node show rcf-linux-beta.our.org
Node Name: rcf-linux-beta.our.org
Environment: pitt
FQDN: rcf-linux-beta.our.org
IP: 1xx.xx.11.102
Run List: role[ntpclient]
Roles: ntpclient
Recipes: ntp
Platform: redhat 5.8
Tags:
rcf-chef:rcf-linux-beta> knife environment show pitt
chef_type: environment
cookbook_versions: {}
default_attributes:
dns:
servers:
1xx.xx.20.114
1xx.xx.154.114
kerberos:
servers:
rcf-kdc1.our.org
rcf-kdc2.our.org
rcf-kdc3.our.org
ntp:
servers:
time.pitt.our.org
time.washington.our.org
description: Location-specific attributes for Pitt
json_class: Chef::Environment
name: pitt
override_attributes: {}
rcf-chef:rcf-linux-beta> knife role show ntpclient
chef_type: role
default_attributes: {}
description:
env_run_lists: {}
json_class: Chef::Role
name: ntpclient
override_attributes:
ntp:
restrictions: []
run_list: ["recipe[ntp]"]
rcf-chef:rcf-linux-beta>
# Generated by Chef for rcf-linux-beta.our.org
# Local modifications will be overwritten.
tinker panic 0
driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
server 0.pool.ntp.org iburst
restrict 0.pool.ntp.org nomodify notrap noquery
server 1.pool.ntp.org iburst
restrict 1.pool.ntp.org nomodify notrap noquery
server 2.pool.ntp.org iburst
restrict 2.pool.ntp.org nomodify notrap noquery
server 3.pool.ntp.org iburst
restrict 3.pool.ntp.org nomodify notrap noquery
server time.pitt.our.org iburst
restrict time.pitt.our.org nomodify notrap noquery
server time.washington.our.org iburst
restrict time.washington.our.org nomodify notrap noquery
restrict default kod notrap nomodify nopeer noquery
restrict 127.0.0.1 nomodify
restrict -6 default kod notrap nomodify nopeer noquery
restrict -6 ::1 nomodify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment