-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Add FreeBSD support #288
Add FreeBSD support #288
Conversation
are you planning on handling mailer.conf(5) as part of the installation as well? |
@igalic I put it in my Here is a snippet from my profile for reference: class profile::osfamily::freebsd inherits profile::osfamily::unix {
# [...]
file { '/usr/local/etc/mail/mailer.conf':
ensure => file,
owner => 'root',
group => 'wheel',
mode => '0644',
source => '/usr/local/share/postfix/mailer.conf.postfix',
require => Package['postfix'],
}
# {{{ Disable sendmail
service { 'sendmail':
ensure => stopped,
before => Service['postfix'],
}
-> file_line { 'sendmail_enable':
ensure => present,
path => '/etc/rc.conf',
line => 'sendmail_enable="NONE"',
match => '^sendmail_enable=',
}
file_line { '/etc/periodic.conf-daily_clean_hoststat_enable':
path => '/etc/periodic.conf',
line => 'daily_clean_hoststat_enable="NO"',
match => '^daily_clean_hoststat_enable=',
}
file_line { '/etc/periodic.conf-daily_status_mail_rejects_enable':
path => '/etc/periodic.conf',
line => 'daily_status_mail_rejects_enable="NO"',
match => '^daily_status_mail_rejects_enable=',
}
file_line { '/etc/periodic.conf-daily_status_include_submit_mailq':
path => '/etc/periodic.conf',
line => 'daily_status_include_submit_mailq="NO"',
match => '^daily_status_include_submit_mailq=',
}
file_line { '/etc/periodic.conf-daily_submit_queuerun':
path => '/etc/periodic.conf',
line => 'daily_submit_queuerun="NO"',
match => '^daily_submit_queuerun=',
}
# }}}
# [...]
} |
https://codeberg.org/daemonpuppet/sysrc i have a module for rc.conf stuff, that could also probably also be used for periodic.conf, but it's undocumented as of yet |
2daf77c
to
32f0991
Compare
In order to bring support for FreeBSD, do not use the hardcoded /etc/postfix path for the directory containing Postfix configuration: FreeBSD ports are installed with a /usr/local/ prefix (by default) so the configuration files on FreeBSD are stored in the /usr/local/etc/postfix directory.
FreeBSD does not have a "root" group. The corresponding group is named "wheel". Allow to setup a custom "root_group", and adjust FreeBSD configuration to set it to "wheel".
4eeca9c
to
75f7389
Compare
manifests/init.pp
Outdated
@@ -93,6 +93,9 @@ | |||
# } | |||
# | |||
class postfix ( | |||
Stdlib::Absolutepath $confdir, | |||
Boolean $manage_mailname, |
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.
Could you put this together with the other manage_*
boolean parameters below, and default to true
here instead of in common.yaml
(just for the sake of homogeneity)?
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.
What about $manage_aliases
and $manage_root_alias
?
They are a bit out of scope of this PR…
Some resources parameters depend on the value of variable from the postfix class. Ensure these values are substitued only after including postfix.
These values are system-dependent, but this helps seeing the usual default value when genering references.
Co-authored-by: Raphaël Pinson <[email protected]>
Prerequisites: