Purpose of /etc/cloud/cloud.cfg.d/

I recently had trouble to have a working WiFi on my Raspberry Pi 4 (Ubuntu 20.04). I found this tutorial online which help me solving the issue.

The trick is to create a file in /etc/cloud/cloud.cfg.d/ named 99-disable-network-config.cfg.

The content of the file is just this line :

network: {config: disabled}

While this works on my RPi4, I do not understand what is the purpose of such a file in this specific folder. Additionally, I do not understand the line in the file.

1 Answer

Well, let me tell you from my perspective. On my system, in /etc/netplan there is a file with the name 50-cloud-init.yaml

The comment block in it goes like:

# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}

I guess, creating 99-disable-network-config.cfg makes a process read it and prevent creating the yaml file.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like