Skip to content

Commit

Permalink
Merge pull request #13 from andreygubarev/fix-shared-network-mac
Browse files Browse the repository at this point in the history
unique seed for mac addr for every molecule project and scenario in shared network
  • Loading branch information
andreygubarev authored Jun 16, 2023
2 parents c982459 + 29bb878 commit ea7bf55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion molecule_qemu/playbooks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"vm_memory": "{{ item.vm_memory | default(qemu_vm_memory) }}",
"vm_disk": "{{ item.vm_disk | default(qemu_vm_disk) }}",
"vm_network": "{{ item.vm_network | default(qemu_vm_network) }}",
"vm_network_mac": "{{ '52:54:00' | community.general.random_mac(seed=item.name | to_json | hash('md5')) | regex_replace('(^|:)0([0-9A-Fa-f])', '\\1\\2') }}",
"vm_network_mac": "{{ '52:54:00' | community.general.random_mac(seed=(molecule_project_name + molecule_scenario_name + item.name) | to_json | hash('md5')) | regex_replace('(^|:)0([0-9A-Fa-f])', '\\1\\2') }}",

"path_disk": "{{ molecule_ephemeral_directory }}/run/{{ item.name }}.qcow2",
"path_pid": "{{ molecule_ephemeral_directory }}/run/{{ item.name }}.pid",
Expand Down

0 comments on commit ea7bf55

Please sign in to comment.