Browse Source

predictable hostnames for virtio

master
parent
commit
c9f3ed3ee8
2 changed files with 14 additions and 0 deletions
  1. +10
    -0
      tasks/main.yml
  2. +4
    -0
      templates/virtio.link.j2

+ 10
- 0
tasks/main.yml View File

@@ -48,6 +48,16 @@
root_target_directory: "{{ live_build_directory }}/config/includes.chroot/" root_target_directory: "{{ live_build_directory }}/config/includes.chroot/"
when: live_build_serial_console == false when: live_build_serial_console == false


- name: systemd network config directory
file:
path: "{{ live_build_directory }}/config/includes.chroot/etc/systemd/network"
state: directory

- name: name policy for predictable interface names with virtio to mac
template:
src: virtio.link.j2
dest: "{{ live_build_directory }}/config/includes.chroot/etc/systemd/network/20-virtio.link"

- name: include common packages - name: include common packages
template: template:
src: common.list.chroot.j2 src: common.list.chroot.j2


+ 4
- 0
templates/virtio.link.j2 View File

@@ -0,0 +1,4 @@
[Match]
Driver=virtio_net
[Link]
NamePolicy=mac

Loading…
Cancel
Save