From 44210a1fe81f9fa05e73cf0f8a6be054ffb05ba6 Mon Sep 17 00:00:00 2001 From: Andreas Thienemann Date: Wed, 26 Sep 2018 17:30:05 -0700 Subject: [PATCH] Reload postfix service by default. The postfix service is currently being restarted whenever a config item changes. This is unnecessary as the postfix service can reload a new config. Set reload: True to prevent unnecessary restarts of the service. The old behavior can be restored by setting the pillar key reload_service to False. --- pillar.example | 1 + postfix/init.sls | 1 + 2 files changed, 2 insertions(+) diff --git a/pillar.example b/pillar.example index a475ac3..dc89724 100644 --- a/pillar.example +++ b/pillar.example @@ -36,6 +36,7 @@ postfix: chroot: True enable_service: True + reload_service: True postgrey: enabled: True diff --git a/postfix/init.sls b/postfix/init.sls index d9d22a6..e884370 100644 --- a/postfix/init.sls +++ b/postfix/init.sls @@ -11,6 +11,7 @@ postfix: - service: postfix service.running: - enable: {{ salt['pillar.get']('postfix:enable_service', True) }} + - reload: {{ salt['pillar.get']('postfix:reload_service', True) }} - require: - pkg: postfix - watch: