Ref T1931
Details
- Reviewers
dereckson - Maniphest Tasks
- T1931: Dovecot Provisioning
- Commits
- rOPS669268298639: Start Dovecot on boot
Deploy to Hervil
Diff Detail
- Repository
- rOPS Nasqueron Operations
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
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.
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. |