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
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
bootandinitramfs.One option would be adding an extra field like
yip_stageor something similar, we could eventually write something like: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:
I was curious to know what you think about these approaches @mudler @Itxaka
Probably there are better options I did not think about