mailcow-ansiblerole
mailcow-ansiblerole copied to clipboard
hangs at "Generate mailcow.conf file" with < 2.5G of memory
The ./generate_config.sh
script blocks on the clamd check when memory is < 2.5G and prompts the user to decide whether to skip clamd. With Ansible, this makes the task hang.
Instead, it should probably respect my mailcow__config_skip_clamd
setting.
As to how that may be done, I'd propose skipping the generate_config.sh
script altogether, making a Jinja template from the default string in the script (starting here) instead, and populating that with the settings from "Template settings for mailcow.conf". That'd simplify the Ansible code for that part, too, but would make it necessary to maintain two copies of the config generation.
I can truly understand the problem. But I never wanted to have to create a jinja template for the mailcow conf, since this just adds more complexity for the maintenance of the role. I think we should adjust the generate_config.sh to be able to understand a kind of non interactive mode where there is no blocking manual input.
I think you're right about that.
@ntimo if you really want to keep the script: add a non-interactive mode or detect non-interactive terminals. its silly to debug since the task hangs a while and than you have to run it interactively yourself.
Opened a PR on the base repository to try to fix this in the problematic script mailcow/mailcow-dockerized#5804 .