ERROR! the field 'hosts' is required but was not set

(attachments)

The error comes all the way at the end, could it be that it’s not an error from that last task, but instead something else?
Also, instead of using the ‘expect’ module, you could use ‘shell’ module and define some corresponding environment variables instead, which seem a little less fragile:

https://github.com/margeson/ansible-iredmail/blob/master/roles/iredmail/tasks/install.yml#L25

Dick

(attachments)