-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure tftp root folder for RHEL8 #113
Conversation
@@ -12,6 +12,26 @@ | |||
changes => "set tftpd_flags '\"-s ${tftp::root}\"'", | |||
} | |||
} | |||
if $facts['os']['family'] =~ /^(RedHat)$/ { | |||
if versioncmp($facts['os']['release']['major'], '8') == 0 { | |||
systemd::unit_file { 'tftp.service': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be much better to use a drop in instead that just replaces ExecStart. Something like:
include systemd
systemd::dropin_file { 'root-directory':
unit => 'tftp.service',
content => "[Service]\nExecStart=\nExecStart=/usr/sbin/in.tftpd -s ${tftp::root}\n",
}
# Deal with both camptocamp/systemd < 3
if defined(Class['systemd::systemctl::daemon_reload']) {
Systemd::Dropin_file['root-directory'] ~> Class['systemd::systemctl::daemon_reload'] -> Service[$ftp::service]
}
@@ -12,6 +12,26 @@ | |||
changes => "set tftpd_flags '\"-s ${tftp::root}\"'", | |||
} | |||
} | |||
if $facts['os']['family'] =~ /^(RedHat)$/ { | |||
if versioncmp($facts['os']['release']['major'], '8') == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's actually safe to assume it's also true on newer versions (which may include Fedora):
if versioncmp($facts['os']['release']['major'], '8') == 0 { | |
if versioncmp($facts['os']['release']['major'], '8') >= 0 { |
} | ||
if $facts['os']['family'] =~ /^(RedHat)$/ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
if $facts['os']['family'] =~ /^(RedHat)$/ { | |
} elsif $facts['os']['family'] == 'RedHat' { |
Included in #115 |
When daemon true in RedHat family greater then 8, the tftpd service is started with the default root folder.
Require: systemd: 'https://github.com/camptocamp/puppet-systemd'