mailcow / mailcow-ansiblerole

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

hangs at "Generate mailcow.conf file" with < 2.5G of memory #11

Open ckoehler opened 3 years ago

ckoehler commented 3 years ago

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.

ckoehler commented 3 years ago

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.

ntimo commented 3 years ago

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.

ckoehler commented 3 years ago

I think you're right about that.

stefanux commented 11 months ago

@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.

Ayowel commented 3 months ago

Opened a PR on the base repository to try to fix this in the problematic script mailcow/mailcow-dockerized#5804 .