Another network config attempt - 3

This commit is contained in:
Neill Cox 2023-09-25 19:03:50 +10:00
parent 492e2d3959
commit d1c3da0128

View file

@ -1,5 +1,22 @@
#cloud-config #cloud-config
system_info: 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: default_user:
name: stack name: stack
password: {data.password} password: {data.password}
@ -12,23 +29,6 @@ ssh_authorized_keys:
# - "nmcli conn delete 'Wired connection 1'" # - "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 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}" # - "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: # runcmd:
# - "subscription-manager register --username {data.rhn_user} --password '{data.rhn_password}'" # - "subscription-manager register --username {data.rhn_user} --password '{data.rhn_password}'"
# - "subscription-manager release --set=8.4" # - "subscription-manager release --set=8.4"