blob: 7cf4f0ceb8d5bb11ef7a9c31feec19af6405566d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
- 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 }}"
|