From d1c3da0128487a047e95f7b414d33d02d4b7ba97 Mon Sep 17 00:00:00 2001 From: Neill Cox Date: Mon, 25 Sep 2023 19:03:50 +1000 Subject: [PATCH] Another network config attempt - 3 --- src/virt-install/user-data.tpl | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/virt-install/user-data.tpl b/src/virt-install/user-data.tpl index 763c214..0b29168 100644 --- a/src/virt-install/user-data.tpl +++ b/src/virt-install/user-data.tpl @@ -1,5 +1,22 @@ #cloud-config system_info: + network: + version: 1 + config: + - type: physical + name: eth0 + subnets: + - type: static + address: {data.cidr_1} + gateway: {data.gateway} + dns: {data.dns} + - type: physical + name: eth1 + subnets: + - type: static + address: {data.cidr_2} + gateway: {data.gateway} + dns: {data.dns} default_user: name: stack password: {data.password} @@ -12,23 +29,6 @@ ssh_authorized_keys: # - "nmcli conn delete 'Wired connection 1'" # - "nmcli con add con-name eth0 ifname eth0 type ethernet ip4 {data.cidr_1} gw4 {data.gateway} ipv4.dns {data.dns}" # - "nmcli con add con-name eth1 ifname eth1 type ethernet ip4 {data.cidr_2} gw4 {data.gateway} ipv4.dns {data.dns}" -network: - version: 1 - config: - - type: physical - name: eth0 - subnets: - - type: static - address: {data.cidr_1} - gateway: {data.gateway} - dns: {data.dns} - - type: physical - name: eth1 - subnets: - - type: static - address: {data.cidr_2} - gateway: {data.gateway} - dns: {data.dns} # runcmd: # - "subscription-manager register --username {data.rhn_user} --password '{data.rhn_password}'" # - "subscription-manager release --set=8.4"