Skip to content

Commit

Permalink
feat(map.jinja): specify package for Fedora 34
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Apr 23, 2021
1 parent 3d2029d commit 0616c83
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
7 changes: 6 additions & 1 deletion ntp/ng/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
'ntp_conf': '/etc/ntp.conf'
},
'Gentoo': {
'package': ' net-misc/ntp',
'package': 'net-misc/ntp',
'service': 'ntpd',
'ntp_conf': '/etc/ntp.conf'
},
Expand All @@ -47,3 +47,8 @@
}
}, merge=True)
} %}
{#- Overwriting the `lookup` value isn't good practice but this is a
temporary fix until a newer `map.jinja` can be introduced #}
{%- if grains.get("osfinger", "") == "Fedora-34" %}
{%- do ntp.lookup.update({"package": "ntpsec"}) %}
{%- endif %}
10 changes: 8 additions & 2 deletions test/integration/default/controls/packages_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# frozen_string_literal: true

pkg =
case system.platform[:finger]
when 'fedora-34'
'ntpsec'
else
'ntp'
end

control 'ntp package' do
title 'should be installed'

pkg = 'ntp'

describe package(pkg) do
it { should be_installed }
end
Expand Down

0 comments on commit 0616c83

Please sign in to comment.