- name: create mail user include_role: name: mail-db tasks_from: user.yml vars: user: name: "{{ mail_account.username }}" domain: "{{ mail_account.domain | d(mail_server.tld) }}" password: "{{ mail_account.password }}" quota_mb: "{{ mail_account.quota_mb | d(None) }}" no_reply: "{{ mail_account.no_reply | d(None) }}" when: (mail_server is defined) and (mail_account is mapping) and (mail_account.username is defined) and (mail_account.password is defined)