Page MenuHomeDevCentral

Start Dovecot on boot
ClosedPublic

Authored by DorianWinty on Aug 9 2024, 19:25.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 13:48
Unknown Object (File)
Fri, Dec 20, 13:42
Unknown Object (File)
Fri, Dec 20, 09:24
Unknown Object (File)
Fri, Dec 20, 02:43
Unknown Object (File)
Thu, Dec 19, 19:43
Unknown Object (File)
Thu, Dec 19, 19:14
Unknown Object (File)
Mon, Dec 9, 20:03
Unknown Object (File)
Mon, Dec 9, 20:02
Subscribers
None

Details

Summary

Ref T1931

Test Plan

Deploy to Hervil

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

DorianWinty created this revision.
dereckson retitled this revision from Configure system to start dovecot on boot to Start Dovecot on boot.Aug 10 2024, 10:32
dereckson edited the test plan for this revision. (Show Details)

Use of enable: True on FreeBSD is a drift from our standard practice

When run on FreeBSD, the service state module will call the freebsdservice execution module.

Salt documentation in execution module freebsdservice states for freebsdservice.enable:

config/etc/rc.conf (read probably config)
Config file for managing service. If config value is empty string, then /etc/rc.conf.d/<service> used. See man rc.conf(5) for details.
Also service.config variable can be used to change default.

So that's documented to create - correctly - /etc/rc.conf.d/dovecot and write dovecot_enable="YES" there.

Everywhere else in the rOPS code, we manually create that file. The only value added to the manual operation is when we need to customize other values than only _enable. As long as it's not the case for Dovecot, the use of enable is perhaps A LOT simpler than file.managed + a new template.

dereckson added inline comments.
roles/mailserver/dovecot/init.sls
14

Service should be enabled and started AFTER the configuration.

If not, it will be launched with default config or for Dovecot without config at all and so will fail.

So we can move this section at the end of the file.

This revision is now accepted and ready to land.Aug 10 2024, 21:35
This revision was automatically updated to reflect the committed changes.