Cloud-init network templates


does anybody have cloud-init snippets/templates which configure network interfaces defined in Foreman, including ethernet, bond, bridge or vlan devices? Preferred is the native format ( but I’d be happy for anything related.

Foreman currently ships with cloud-init that completely ignores network configuration for some reason. I now that on most clouds networking is usually DHCP and that’s the default, but it matters in virtualized environments.

I haven’t tried this myself, it looks like networking info should be passed as a separate field into oVirt for some reason, in cloud-init docs the networking data is often passed in a separate file:

If we add this into Foreman templates, I’d like to write some tests validating syntax around it via cloud-init devel schema command.

Also I have noticed we carry few user data templates which are actually shell scripts. Does anyone use that? What’s the use case?


One small remark/hint/comment: If I remember correctly there was an issue with the cloud-init network config combined with the NoCloud datasource we use for the vmware workflow. I don’t remember the exact details, though.

Yeah, when I was reading cloud-init docs it was a mess. Multiple syntax formats, different “implementations”. I wonder why this is so complex, isn’t this just dropping a configuration file somewhere and restarting network?

I wonder if we could at least implement a temporary solution - including kickstart_networking_setup snippet from cloud-init for debian and redhat systems. That could be a good starting point.