k3s-ansible/enable-ethernet.yml
2024-02-19 22:16:01 -05:00

18 lines
438 B
YAML

- hosts: raspberry_pis
become: true
tasks:
- name: Configure eth0 using Netplan
copy:
dest: "/etc/netplan/01-netcfg.yaml"
content: |
network:
version: 2
ethernets:
eth0:
dhcp4: true
owner: "root"
group: "root"
mode: "0644"
- name: Apply netplan configuration
ansible.builtin.command:
cmd: netplan apply