Custom cloud-init network configuration examples please?

trial-and-error’ing my way through this… I didn’t know exactly how to get the disabling curtin file into the “in target” machine…

I looked at this topic …

Set default cloud-init - Users - Canonical MAAS | Discourse
and thought I’d try entering the rack server and creating this file …

/var/snap/maas/current/preseeds/curtin_userdata_ubuntu

#cloud-config
write_files:
  - path: /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
    owner: root
    content: |
      network:
        config: disabled

When I put my test machine through the cycle I did not get that file created

/etc/cloud/cloud.cfg.d$ ls -ltr
total 28
-rw-r--r-- 1 root root  167 Oct 24 14:53 README
-rw-r--r-- 1 root root 2070 Oct 24 14:53 05_logging.cfg
-rw-r--r-- 1 root root   81 Jan  3 21:05 90_dpkg.cfg
-rw------- 1 root root  320 Jan  3 21:05 90_dpkg_maas.cfg
-rw-r--r-- 1 root root  364 Jan  3 21:05 90_dpkg_local_cloud_config.cfg
-rw-r--r-- 1 root root   35 Jan  3 21:05 curtin-preserve-sources.cfg
-rw-r--r-- 1 root root  295 Jan  3 21:06 50-curtin-networking.cfg

so,… back to making guesses about how this works.

I will try the region server next perhaps.

maybe after that I’ll stop assuming that maas respects the contents of /var/snap/maas/current/preseeds/ and do one of those overlay tricks to force it?

fun.