mailcow-ansiblerole icon indicating copy to clipboard operation
mailcow-ansiblerole copied to clipboard

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

Open jimboolio opened this issue 2 years ago • 0 comments

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.

jimboolio avatar Jan 02 '23 21:01 jimboolio