10 lines
325 B
YAML
10 lines
325 B
YAML
|
- name: Rename network interface to net0
|
||
|
ansible.builtin.shell: ip link set dev {{ ansible_default_ipv4.interface }} name net0; netplan apply
|
||
|
register: rename_interface
|
||
|
failed_when: rename_interface.rc != 0
|
||
|
|
||
|
- name: Display renamed network interface
|
||
|
ansible.builtin.debug:
|
||
|
msg: "Renamed network interface: net0"
|
||
|
|