mailcow / mailcow-ansiblerole

The official ansible role to setup mailcow using Ansible
GNU General Public License v3.0
75 stars 49 forks source link

Task "Generate mailcow.conf file" does not behave declaratively #39

Open jimboolio opened 1 year ago

jimboolio commented 1 year ago

In main.yml task Generate mailcow.conf file calls ./generate_config.sh but if that fails at any point, re-running the playbook does not rebuild mailcow.conf since that script checks if mailcow.conf is already installed so the config will be left broken and not as defined when calling.

Technically the playbook should respect the changes set when calling it and override the variables set in mailcow.conf, but that would also likely break stuff, so my suggest solution would be adding a check what the variables already exists and if they differ, then the playbook should probably exit with an error, since otherwise it will succeed and silently keep incorrect configuration.