Fix mail_virtual_domains config reading in opendkim
without this change it fails on ansible(2.2.0.0) with the following message:
TASK [mailserver : Generate OpenDKIM keys] *************************************
fatal: [sovereign.host]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'unicode object' has no attribute 'name'\n\nThe error appears to have been in '/Users/nfedyashev/Projects/sovereign/roles/mailserver/tasks/opendkim.yml': line 19, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Generate OpenDKIM keys\n ^ here\n"}
mail_virtual_xx list were not use correctly in tasks.
We got error 'unicode object' has no attribute 'name' because:
with_items:
- "{{ mail_virtual_xx }}
is understood has a list of strings containing information extracted from {{ mail_virtual_xx }} variable
Now we use:
with_items: virtual_domain_xx}}"