Set virbr1's MAC to en*'s MAC
This commit is contained in:
parent
94f19984e1
commit
f8bf585b5f
1 changed files with 6 additions and 0 deletions
|
@ -38,6 +38,12 @@
|
|||
- virbr1
|
||||
- virbr2
|
||||
|
||||
- name: Set MAC-Address of virtio1 to ethernet nic
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/systemd/network/30-virbr1.netdev
|
||||
line: "MACAddress={{ ansible_facts[ansible_interfaces | select('search', '^en.*') | first].macaddress }}"
|
||||
when: ansible_interfaces | select('search', '^en.*')
|
||||
|
||||
- name: Configure systemd-networkd ethernet.network
|
||||
ansible.builtin.copy:
|
||||
dest: /etc/systemd/network/40-ethernet.network
|
||||
|
|
Loading…
Add table
Reference in a new issue