-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Is your feature request related to a problem? Please describe.
Cloud init supports made available by this Ansible collection does not allow to configure RHEL/CentOS networking.
It works good with Ubuntu/Debian.
Describe the solution you'd like
Allow to use network-config configuration in the same way than user-data and meta-data
tasks:
- name: Create K3s server VM
ansible.builtin.include_role:
name: scale_computing.hypercore.template2vm
vars:
....
# cloud-init
template2vm_user_data: "{{ lookup('template', 'user-data.rhel9.yml.j2') }}"
template2vm_meta_data: "{{ lookup('template', 'meta-data.rhel9.yml.j2') }}"
template2vm_network_config: "{{ lookup('template', 'network-config.rhel9.yml.j2') }}"
Describe alternatives you've considered
Build the cloud-init ISO
by myself for each VM... :/
Additional context
The following cloud-init configuration does not work when using RHEL/CentOS distribution :
instance-id: iid-abcdefg
network-interfaces: |
iface eth0 inet static
address 192.168.1.10
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.254
hostname: myhost
see https://cloudinit.readthedocs.io/en/latest/reference/datasources/nocloud.html#example-meta-data.
Some processing are done by cloud-init to convert this ENI style configuration to network-configuration v1 but it seems to have bad processing which made it unusable on RHEL/CentOS.
Why not to fix cloud-init? Regarding cloud-init documentation, network-config should be the correct way to handle network configuration and does not depends on some specific feature (NoCloud and ENI in our case)