Search code examples
openstackcloud-init

Cloud-init should use another yaml file. Not 50-cloud-init.yaml


i would like cloud-init to not use 50-cloud-init.yaml. I have prepared my own file. Do you know how to do this


Solution

  • You can add

    network:
      config: disabled
    

    to /etc/cloud/cloud.cfg or a file in /etc/cloud/cloud.cfg.d.

    Another option is to add

    network-config=disabled
    

    to the kernel command line.

    While the network config yaml technically works as userdata, the network configuration will have already been written out before userdata is read.

    One other option is to write your netplan configuration into /etc/netplan/99-some-name.yaml. If you have configuration there that overlaps with what is in 50-cloud-init.yaml, your configuration will override what is in the default configuration.

    See https://cloudinit.readthedocs.io/en/latest/topics/network-config.html#disabling-network-configuration .