cookbook 'ntpdate', '~> 1.7.0'
ntpdate (11) Versions 1.7.0 Follow1
Installs/Configures ntpdate
cookbook 'ntpdate', '~> 1.7.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.
By default the cookbook will remove NTP package (if installed).
Requirements
Nothing really special. It depends on the opscode's cron cookbook in order to lay the cronjob.
Attributes
| Key | Type | Description | Default | 
|---|---|---|---|
| ['ntpdate']['enable'] | Boolean | enable or disable ALL actions | true | 
| ['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 | 
| ['ntpdate']['ntp_pkg_remove'] | Boolean | Defines if the NTP packet should be removed | true | 
| ['ntpdate']['ntp_pkg_name'] | String | NTP Package name | ntp | 
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]"
  ]
}
disabling ALL actions
but leaving the recipe in run_list() and the role configuration (sometimes is useful). This will remove all the configuration files the cookbook normally creates but will leave the packages as they are (actual stand).
{
  "name":"my_node",
  "ntpdate": {
   "enable": false
    "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",
        "weekday": "sun"
    }
  },
  "run_list": [
    "recipe[ntpdate::default]"
  ]
}
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 >= 0.0.0 | 
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
ntpdate CHANGELOG
1.7.0
- added tests for 
Ubuntu 24.04 - removed EOL 
chef/Ubuntu X.Ytests. 
1.6.0
- added support for chef 
v18 
1.5.1
- no functional changes. Bump version to conform supermarket requirements.
 - added TESTING.md file.
 
1.5.0
- added support chef 
v17andUbuntu 22.04 
1.4.1
- configured 
github actions. - added tests reporting.
 
1.4.0
- added support chef 
v15andv16 - 
kitchentest suite switched todokken/inspec - some code linting done.
 - EOL 
foodcriticremoved. 
1.3.0
- 
croncookbook's dependency updated. - 
kitchentest suite added. - support Chef 
v13andv14tested. - 
cookstylelinter applied. 
1.2.1
- foodcritic compliance made.
 
1.2.0
- 
node[:ntpdate][:enable]control directive added. Default istrue. 
1.1.0
- NTP package leads to race condition on port. Will be removed by deafult, unless 
node[:ntpdate][:ntp_pkg_remove]directive is set to false 
1.0.1
- Cronjob stdout to 
/dev/null 
1.0.0
- Ready for the first release.
 
0.1.0
- Initial release of ntpdate
 
Collaborator Number Metric
        
            1.7.0 failed this metric
            Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
        
      Cookstyle Metric
        
            1.7.0 passed this metric
        
      No Binaries Metric
        
            1.7.0 passed this metric
        
      Testing File Metric
        
            1.7.0 passed this metric
        
      Version Tag Metric
        
            1.7.0 passed this metric
        
  
1.7.0 failed this metric
            1.7.0 passed this metric
        
      No Binaries Metric
        
            1.7.0 passed this metric
        
      Testing File Metric
        
            1.7.0 passed this metric
        
      Version Tag Metric
        
            1.7.0 passed this metric
        
  
1.7.0 passed this metric
            1.7.0 passed this metric
        
      Version Tag Metric
        
            1.7.0 passed this metric
        
  
1.7.0 passed this metric