Skip to content

Commit

Permalink
Add drop-in to disable certificate bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
minorOffense authored and nward committed Aug 17, 2023
1 parent f36ac50 commit c68f394
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ fixtures:
logrotate: "puppet/logrotate"
rsyslog: "saz/rsyslog"
stdlib: "puppetlabs/stdlib"
systemd: "camptocamp/systemd"
systemd: "puppet/systemd"
10 changes: 10 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@
notify => Service[$freeradius::fr_service],
}

# Add systemd unit to override default file on RHEL8 systems.
if ($facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '8') {
systemd::dropin_file { 'freeradius remove bootstrap':
ensure => present,
filename => 'remove_bootstrap.conf',
unit => 'radiusd.service',
content => template('freeradius/systemd_dropin_rhel8.erb'),
}
}

# Preserve some stock modules
if ($preserve_mods) {
freeradius::module { [
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"version_requirement": ">=1.0.0 <7.0.0"
},
{
"name": "camptocamp/systemd",
"version_requirement": ">=2.0.0 <3.0.0"
"name": "puppet/systemd",
"version_requirement": ">=3.0.0 <5.0.0"
}
],
"operatingsystem_support": [
Expand Down
4 changes: 4 additions & 0 deletions templates/systemd_dropin_rhel8.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[Service]
ExecStartPre=
ExecStartPre=-/bin/chown -R radiusd.radiusd /var/run/radiusd
ExecStartPre=/usr/sbin/radiusd -C

0 comments on commit c68f394

Please sign in to comment.