Enhancement
As a follow-up to #916, it feels like it would be nice to have more flexible timing for when the write-files module is run.
For instance, I'd like to use write-files to write a file to a filesystem that is mounted using the mount module, but before runcmd is called. However, by default, write-files happens before mount. So the new filesystem will be mounted over-top of the file I just wrote.
I would suggest moving the write-files module to happen after mount, but that would break backwards compatibility, and also not work for the use-case of a user writing files like /etc/fstab that get taken into consideration in the mount module.
It feels like it would be nice to have more flexibility for the end-user to choose exactly when given files get written. Right now, with #916, there is basically one write-files hook that happens in the beginning of the boot process, and one write-files that happens at the very end of the cloud-init process. It would be nice to have a baked-in way of writing files at other points in the cloud-init process.
Enhancement
As a follow-up to #916, it feels like it would be nice to have more flexible timing for when the
write-filesmodule is run.For instance, I'd like to use
write-filesto write a file to a filesystem that is mounted using themountmodule, but beforeruncmdis called. However, by default,write-fileshappens beforemount. So the new filesystem will be mounted over-top of the file I just wrote.I would suggest moving the
write-filesmodule to happen aftermount, but that would break backwards compatibility, and also not work for the use-case of a user writing files like/etc/fstabthat get taken into consideration in themountmodule.It feels like it would be nice to have more flexibility for the end-user to choose exactly when given files get written. Right now, with #916, there is basically one
write-fileshook that happens in the beginning of the boot process, and onewrite-filesthat happens at the very end of the cloud-init process. It would be nice to have a baked-in way of writing files at other points in the cloud-init process.