Skip to content

[enhancement]: more flexible timing for write-files module #4181

@cdepillabout

Description

@cdepillabout

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestincompleteAction required by submitter

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions