Page MenuHomeDevCentral

Start Dovecot on boot
ClosedPublic

Authored by DorianWinty on Aug 9 2024, 19:25.
Tags
None
Referenced Files
F3765184: D3413.id8805.diff
Fri, Nov 22, 10:53
F3765094: D3413.id8814.diff
Fri, Nov 22, 10:17
F3764112: D3413.diff
Fri, Nov 22, 04:16
F3762966: D3413.id8814.diff
Thu, Nov 21, 18:23
F3762965: D3413.id8805.diff
Thu, Nov 21, 18:23
F3762851: D3413.id.diff
Thu, Nov 21, 16:44
F3762823: D3413.diff
Thu, Nov 21, 16:12
Unknown Object (File)
Tue, Nov 19, 07: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.