Configuring wifi via cloud-config
This example is valid for systemd-based systems.
#cloud-config
hostname: metal-{{ trunc 4 .MachineID }}
users:
  - name: kairos
    # Change to your pass here
    passwd: kairos
    ssh_authorized_keys:
    # Replace with your github user and un-comment the line below:
    # - github:mudler
stages:
  initramfs:
    - path: /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
      content: |
        # This file should be generated using wpa_passphrase
        ctrl_interface=/var/run/wpa_supplicant
        ctrl_interface_group=admin
        network={
                ssid="$SSID_GOES_HERE"
                psk=$PSK_GOES_HERE
        }
      permissions: 0600
      owner: 0
      group: 0
  boot:
    - name: "Enabling wireless"
      commands:
        - |
          systemctl enable wpa_supplicant@wlan0
          systemctl disable wpa_supplicant
          systemctl stop wpa_supplicant || :
          systemctl start wpa_supplicant@wlan0 || :Note
This is only an example as there is many ways of configuring wifi via cloud config depending on the software installed on the imageFeedback
Was this page helpful?
Awesome! Glad to hear it! Please tell us how we can improve.
Oh snap! Sorry to hear that. Please tell us how we can improve.