cookbook 'ntpdate', '= 1.0.0'
ntpdate (11) Versions 1.0.0 Follow1
Installs/Configures ntpdate
cookbook 'ntpdate', '= 1.0.0', :supermarket
knife supermarket install ntpdate
knife supermarket download ntpdate
ntpdate Cookbook
Installs ntpdate
and configures it to run as a scheduled job.(Although it later uses the ntpdate-debian
binary, see man ntpdate
).
The reason for this one may found after struggling to sync the time via NTP daemon without exposing the external network interface to the world.
Requirements
Nothing really special. It depends on the opscode's cron cookbook in order to lay the cronjob.
Attributes
Key | Type | Description | Default |
---|---|---|---|
['ntpdate']['use_ntp_config'] | String | whether to use the ntp.conf file config | 'no' |
['ntpdate']['config_folder'] | String | Where lays the config file | '/etc/default' |
['ntpdate']['config_file'] | String | Config file name | 'ntpdate' |
['ntpdate']['ntp_servers'] | StringArray | Which time servers to sync from | %w(pool.ntp.org) |
['ntpdate']['ntp_options'] | String | Additional options for ntpdate | nil |
['ntpdate']['package_name'] | StringArray | Which packages to install | %w(ntpdate) |
['ntpdate']['crontab_file'] | String | Crontab file name to create in /etc/cron.d directory | ntpdate |
For the [:ntpdate][:crontab]
directives check the cron cookbook from opscode.
Usage
ntpdate::default
{ "name":"my_node", "ntpdate": { "ntp_servers": %w{ntp1.somedomain.com ntp2.somedomain.com}, "crontab": { "comment": "This Cron sets time on Sundays at 6:00 O'clock", "minute": "0", "hour": "6", "day": "7" } }, "run_list": [ "recipe[ntpdate]" ] }
Contributing
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
License and Authors
Authors: Ivan Golman (ivan.golman@gmail.com)
Dependent cookbooks
cron ~> 1.6 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
ntpdate CHANGELOG
This file is used to list changes made in each version of the ntpdate cookbook.
1.0.0
- [golman] - Ready for the first release.
0.1.0
- [golman] - Initial release of ntpdate
Check the Markdown Syntax Guide for help with Markdown.
The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.
Foodcritic Metric
1.0.0 failed this metric
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:4
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:6
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:7
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:8
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:13
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:14
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:15
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:21
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:24
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:25
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:8
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:14
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:16
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:17
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:19
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:20
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:21
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:24
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:25
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:26
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:27
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:28
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/install.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/templates/default/ntpdate.erb:6
1.0.0 failed this metric
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:4
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:6
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:7
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:8
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:13
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:14
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:15
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:21
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:24
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/attributes/default.rb:25
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:8
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:14
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:16
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:17
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:19
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:20
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:21
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:24
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:25
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:26
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:27
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/configure.rb:28
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/recipes/install.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/35d17393a07b4e94f7c23fb3/ntpdate/templates/default/ntpdate.erb:6