- name: generate lladdr variable for virtual machines set_fact: tmp_vms: > {{ tmp_vms | default([]) + [ item | combine({ 'lladdr': item.name | hash('sha1') | truncate(12, True, '') | ansible.netcommon.hwaddr('unix') }) ] }} loop: "{{ __vms }}" - name: save variables set_fact: __vms: "{{ tmp_vms }}"