Skip to content

Commit

Permalink
Correct NTPd package choosing under el9 (#253)
Browse files Browse the repository at this point in the history
* Correct NTPd package choosing under el9
  • Loading branch information
bish0polis authored Jul 15, 2024
1 parent b193c68 commit b6aefc5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ This file is used to list changes made in each version of the ntp cookbook.

## Unreleased

## 5.2.1 - *2024-07-15*
Update ntpd package for Enterprise Linux 9 (ie Oracle, Rocky, Alma)

## 5.2.0 - *2024-07-15*
## 5.2.1 - *2024-07-15*

Standardise files with files in sous-chefs/repo-management

## 5.2.0 - *2024-07-15*

Added capability to set logconfig using an attribute

## 5.1.2 - *2024-05-02*
Expand Down
6 changes: 5 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@
default['ntp']['leapfile'] = '/usr/share/zoneinfo/leap-seconds.list'
when 'rhel', 'fedora', 'amazon'
default['ntp']['leapfile_managed_by_os'] = true
default['ntp']['packages'] = %w(ntp ntpdate) if node['platform_version'].to_i >= 7
default['ntp']['packages'] = if node['platform_version'].to_i >= 9
%w(ntpsec) # RPM found in Epel Repo
else
%w(ntp ntpdate)
end
default['ntp']['driftfile'] = "#{node['ntp']['varlibdir']}/drift"
default['ntp']['leapfile'] = '/usr/share/zoneinfo/leapseconds'
when 'windows'
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/recipes/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@
expect(chef_run).to install_package('ntp')
end

it 'does not install the ntpdate package' do
expect(chef_run).to_not install_package('ntpdate')
it 'installs the ntpdate package' do
expect(chef_run).to install_package('ntpdate')
end

it 'starts the ntpd service' do
Expand Down

0 comments on commit b6aefc5

Please sign in to comment.