From ec57b507f8717c338d282e3bde989b53b683a202 Mon Sep 17 00:00:00 2001 From: David Mandelberg Date: Mon, 23 Oct 2023 21:19:40 -0400 Subject: [PATCH] Prevent Debian package from recreating a file --- salt/file/mail/web/init.sls | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/salt/file/mail/web/init.sls b/salt/file/mail/web/init.sls index 320f052..cf6a4bb 100644 --- a/salt/file/mail/web/init.sls +++ b/salt/file/mail/web/init.sls @@ -205,3 +205,16 @@ roundcube database migrations: - {{ apache_httpd.config_dir }}/sites-enabled is clean - watch_in: - apache_httpd_running + +{{ apache_httpd.config_dir }}/conf-enabled/roundcube.conf: + file.managed: + - contents: | + # The Debian package re-creates a symlink at this path on every upgrade. + # This file exists to prevent that from happening. + - follow_symlinks: false + - require: + - {{ apache_httpd.config_dir }}/conf-enabled exists + - require_in: + - {{ apache_httpd.config_dir }}/conf-enabled is clean + - watch_in: + - apache_httpd_running