2024-ansible-case/roles/start/tasks/network_configuration.yml

10 lines
325 B
YAML
Raw Normal View History

2024-08-28 22:56:40 +07:00
- 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"