Skip to content

Commit a6b498a

Browse files
(#207) Removed el7 support, added el10 support (#208)
* (#207) Removed el7 support, added el10 support * Switched the default behavior of service restarts so that it will simply restart the service instead of telling customers they need to restart their machines Fixes #207 --------- Co-authored-by: Steven Pritchard <steve@sicura.us>
1 parent e90284c commit a6b498a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+401
-234
lines changed

.github/workflows/pr_tests.yml

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ on:
2626
pull_request:
2727
types: [opened, reopened, synchronize]
2828

29-
env:
30-
PUPPET_VERSION: '~> 7'
31-
3229
jobs:
3330
puppet-syntax:
3431
name: 'Puppet Syntax'
@@ -130,12 +127,34 @@ jobs:
130127
- run: 'bundle exec rake spec'
131128
continue-on-error: ${{matrix.puppet.experimental}}
132129

133-
# dump_contexts:
134-
# name: 'Examine Context contents'
135-
# runs-on: ubuntu-latest
136-
# steps:
137-
# - name: Dump contexts
138-
# env:
139-
# GITHUB_CONTEXT: ${{ toJson(github) }}
140-
# run: echo "$GITHUB_CONTEXT"
141-
#
130+
acceptance:
131+
runs-on:
132+
- ubuntu-latest
133+
strategy:
134+
matrix:
135+
node:
136+
- almalinux9
137+
- almalinux10
138+
fail-fast: false
139+
steps:
140+
- name: checkout repo
141+
uses: actions/checkout@v4
142+
- name: setup ruby
143+
uses: ruby/setup-ruby@v1
144+
with:
145+
ruby-version: 3.2
146+
- name: bundle install
147+
run: |
148+
bundle install
149+
- name: Setup libvirt for Vagrant
150+
run: |
151+
sudo add-apt-repository ppa:evgeni/vagrant
152+
sudo apt-get update
153+
sudo apt-get install -y --no-install-recommends vagrant vagrant-libvirt libvirt-daemon-system libvirt-daemon qemu-system-x86 qemu-utils dnsmasq
154+
sudo chmod 666 /var/run/libvirt/libvirt-sock
155+
- name: beaker
156+
env:
157+
BEAKER_HYPERVISOR: 'vagrant_libvirt'
158+
VAGRANT_DEFAULT_PROVIDER: 'libvirt'
159+
run: |
160+
bundle exec rake beaker:suites[default,${{ matrix.node }}]

.rubocop.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
require:
2+
plugins:
33
- rubocop-performance
44
- rubocop-rake
55
- rubocop-rspec
66
AllCops:
77
NewCops: enable
88
DisplayCopNames: true
9-
TargetRubyVersion: "2.7"
9+
TargetRubyVersion: 2.7
1010
Include:
1111
- "**/*.rb"
1212
Exclude:
@@ -697,3 +697,5 @@ Style/StringChars:
697697
Enabled: false
698698
Style/SwapValues:
699699
Enabled: false
700+
Naming/PredicatePrefix:
701+
Enabled: false

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Tue Jul 22 2025 Mike Riddle <mike@sicura.us> - 9.0.0
2+
- Removed EL 7 support
3+
- Added EL 10 support
4+
15
* Wed Aug 27 2025 Steven Pritchard <steve@sicura.us> - 8.14.5
26
- Clean up for rubocop
37

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ group :test do
3636
gem 'simp-rake-helpers', ENV.fetch('SIMP_RAKE_HELPERS_VERSION', '~> 5.24.0')
3737
# renovate: datasource=rubygems versioning=ruby
3838
gem 'simp-rspec-puppet-facts', ENV.fetch('SIMP_RSPEC_PUPPET_FACTS_VERSION', '~> 4.0.0')
39+
gem 'syslog'
3940
end
4041

4142
group :development do
@@ -47,6 +48,7 @@ end
4748
group :system_tests do
4849
gem 'bcrypt_pbkdf'
4950
gem 'beaker'
51+
gem 'beaker_puppet_helpers'
5052
gem 'beaker-rspec'
5153
# renovate: datasource=rubygems versioning=ruby
5254
gem 'simp-beaker-helpers', ENV.fetch('SIMP_BEAKER_HELPERS_VERSION', '~> 2.0.0')

REFERENCE.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ The following parameters are available in the `auditd` class:
117117
* [`verify_email`](#-auditd--verify_email)
118118
* [`write_logs`](#-auditd--write_logs)
119119
* [`purge_auditd_rules`](#-auditd--purge_auditd_rules)
120+
* [`auditctl_command`](#-auditd--auditctl_command)
121+
* [`warn_if_reboot_required`](#-auditd--warn_if_reboot_required)
120122

121123
##### <a name="-auditd--enable"></a>`enable`
122124

@@ -148,7 +150,7 @@ of audit rules.
148150
- @see `auditd::config::audit_profiles` for more details about this
149151
configuration.
150152

151-
Default value: `[ 'simp' ]`
153+
Default value: `['simp']`
152154

153155
##### <a name="-auditd--audit_auditd_config"></a>`audit_auditd_config`
154156

@@ -547,7 +549,7 @@ to be backwards compatable. If you want to ensure the plugin is disabled,
547549
set auditd::config::audisp::syslog::enable to false.
548550
If this is set to false the plugin settings are not managed by puppet.
549551

550-
Default value: `simplib::lookup('simp_options::syslog', {'default_value' => false })`
552+
Default value: `simplib::lookup('simp_options::syslog', { 'default_value' => false })`
551553

552554
##### <a name="-auditd--target_selinux_types"></a>`target_selinux_types`
553555

@@ -602,6 +604,22 @@ Whether or not to purge existing auditd rules under /etc/audit/rules.d
602604

603605
Default value: `true`
604606

607+
##### <a name="-auditd--auditctl_command"></a>`auditctl_command`
608+
609+
Data type: `String[1]`
610+
611+
612+
613+
Default value: `'/usr/sbin/auditctl'`
614+
615+
##### <a name="-auditd--warn_if_reboot_required"></a>`warn_if_reboot_required`
616+
617+
Data type: `Boolean`
618+
619+
620+
621+
Default value: `false`
622+
605623
### <a name="auditd--config"></a>`auditd::config`
606624

607625
NOTE: THIS IS A [PRIVATE](https://github.com/puppetlabs/puppetlabs-stdlib#assert_private) CLASS**
@@ -2354,36 +2372,32 @@ Data type: `Variant[String[1],Boolean]`
23542372

23552373
``ensure`` state from the service resource
23562374

2357-
Default value: `pick(getvar('auditd::enable'), 'running')`
2375+
Default value: `$auditd::enable`
23582376

23592377
##### <a name="-auditd--service--enable"></a>`enable`
23602378

23612379
Data type: `Boolean`
23622380

23632381
``enable`` state from the service resource
23642382

2365-
Default value: `pick(getvar('auditd::enable'), true)`
2383+
Default value: `$auditd::enable`
23662384

23672385
##### <a name="-auditd--service--bypass_kernel_check"></a>`bypass_kernel_check`
23682386

2369-
Data type: `Boolean`
2370-
23712387
Do not check to see if the kernel is enforcing auditing before trying to
23722388
manage the service.
23732389

23742390
* This may be required if auditing is not being actively managed in the
23752391
kernel and someone has stopped the auditd service by hand.
23762392

2377-
Default value: `false`
2378-
23792393
##### <a name="-auditd--service--warn_if_reboot_required"></a>`warn_if_reboot_required`
23802394

23812395
Data type: `Boolean`
23822396

23832397
Add a ``reboot_notify`` warning if the system requires a reboot before the
23842398
service can be managed.
23852399

2386-
Default value: `true`
2400+
Default value: `$auditd::warn_if_reboot_required`
23872401

23882402
## Defined types
23892403

@@ -2505,7 +2519,7 @@ The array
25052519

25062520
Data type: `Optional[Integer]`
25072521

2508-
The minimum number of digits the index should be.
2522+
The minimum number of digits the index should be.
25092523
It will be '0'-padded to meet this number.
25102524

25112525
### <a name="auditd--validate_init_params"></a>`auditd::validate_init_params`

data/os/CentOS-7.yaml renamed to data/os/AlmaLinux-10.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2-
# Default to version 2 settings
3-
auditd::dispatcher: '/sbin/audispd'
4-
auditd::disp_qos: 'lossy'
5-
auditd::plugin_dir: '/etc/audisp/plugins.d'
2+
# Default to auditd version 3 settings
3+
auditd::plugin_dir: '/etc/audit/plugins.d'
4+
auditd::config::audisp::syslog::type: 'always'
5+
auditd::config::audisp::syslog::syslog_path: '/sbin/audisp-syslog'
6+
auditd::config::audisp::syslog::pkg_name: 'audispd-plugins'
67

78
auditd::config::audit_profiles::stig::default_suid_sgid_cmds:
89
- "/usr/bin/at"

data/os/OracleLinux-7.yaml renamed to data/os/CentOS-10.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2-
# Default to auditd version 2 settings
3-
auditd::dispatcher: '/sbin/audispd'
4-
auditd::disp_qos: 'lossy'
5-
auditd::plugin_dir: '/etc/audisp/plugins.d'
2+
# Default to auditd version 3 settings
3+
auditd::plugin_dir: '/etc/audit/plugins.d'
4+
auditd::config::audisp::syslog::type: 'always'
5+
auditd::config::audisp::syslog::syslog_path: '/sbin/audisp-syslog'
6+
auditd::config::audisp::syslog::pkg_name: 'audispd-plugins'
67

78
auditd::config::audit_profiles::stig::default_suid_sgid_cmds:
89
- "/usr/bin/at"

data/os/RedHat-7.yaml renamed to data/os/RedHat-10.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
---
2-
# Default to auditd version 2 settings
3-
auditd::dispatcher: '/sbin/audispd'
4-
auditd::disp_qos: 'lossy'
5-
auditd::plugin_dir: '/etc/audisp/plugins.d'
2+
# Default to auditd version 3 settings
3+
auditd::plugin_dir: '/etc/audit/plugins.d'
4+
auditd::config::audisp::syslog::type: 'always'
5+
auditd::config::audisp::syslog::syslog_path: '/sbin/audisp-syslog'
6+
auditd::config::audisp::syslog::pkg_name: 'audispd-plugins'
67

78
auditd::config::audit_profiles::stig::default_suid_sgid_cmds:
89
- "/usr/bin/at"

lib/facter/auditd_sample_ruleset_location.rb

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
Facter.add('auditd_sample_ruleset_location') do
88
confine kernel: 'Linux'
99

10-
confine do
11-
File.directory?('/usr/share/audit/sample-rules') || !Dir.glob('/usr/share/doc/audit*/rules').empty?
12-
end
13-
1410
setcode do
15-
retval = '/usr/share/audit/sample-rules' if File.directory?('/usr/share/audit/sample-rules')
16-
retval = Dir.glob('/usr/share/doc/audit*/rules').first unless Dir.glob('/usr/share/doc/audit*/rules').empty?
11+
candidates = [
12+
'/usr/share/audit/sample-rules',
13+
'/usr/share/audit-rules',
14+
'/usr/share/doc/auditd/examples/rules',
15+
] + Dir.glob('/usr/share/doc/audit*/rules')
1716

18-
retval
17+
candidates.find { |d| File.directory?(d) && !Dir.glob("#{d}/*.rules").empty? }
1918
end
2019
end

manifests/config.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
}
6969
} else {
7070
# If auditd version is unknown use 'best guess' at default OS version
71-
$_auditd_conf_main = $facts['os']['release']['major'] < '8' ? {
71+
$_auditd_conf_main = Integer($facts['os']['release']['major']) < 8 ? {
7272
false => epp("${module_name}/etc/audit/auditd.3.conf.epp"),
7373
default => epp("${module_name}/etc/audit/auditd.2.conf.epp")
7474
}

0 commit comments

Comments
 (0)