Skip to content

Allow mapping cloud-init syntax to custom stages #109

Description

@davidcassany

This is a feature I have been wondering about for a while. Would be nice having some sort of mechanism to allow mapping cloud-init syntax to specific stages instead of being stuck to boot and initramfs.

One option would be adding an extra field like yip_stage or something similar, we could eventually write something like:

#cloud-config
write_files:
  - content: |
      created once connected to the network
run_cmds:
  - echo "I am online" 
yip_stage: network

The limitation of this is that it would not be possible to set multiple stages in a single file.

Other more sophisticated (and probably a bit convoluted) approach could be providing a map directly:

#cloud-config
write_files:
  - content: |
      created once connected inside the initramfs env
run_cmds:
  - echo "I am online" 
yip_stages:
  run_cmds: network
  write_files: initramfs

I was curious to know what you think about these approaches @mudler @Itxaka
Probably there are better options I did not think about

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions