Allow specifying MACs for network interfaces

This commit is contained in:
Neill Cox 2023-09-26 10:01:47 +10:00
parent b44b4978cd
commit 3f7eddb978
2 changed files with 45 additions and 15 deletions

View file

@ -7,11 +7,7 @@ chpasswd: {{expire: False}}
ssh_pwauth: True
ssh_authorized_keys:
- {data.public_key}
bootcmd:
- "nmcli con modify 'System eth0' ipv4.address {data.cidr_1} ipv4.method static ipv4.gateway {data.gateway} ipv4.dns {data.dns}"
- "nmcli con modify 'Wired connection 1' ipv4.address {data.cidr_2} ipv4.method static ipv4.gateway {data.gateway} ipv4.dns {data.dns}"
- "nmcli networking off"
- "nmcli networking on"
{bootmd}
runcmd:
- "service sshd restart"
- "subscription-manager register --username {data.rhn_user} --password '{data.rhn_password}'"
@ -25,7 +21,7 @@ runcmd:
- "echo '***************************************************************************'"
- "echo '*** ***'"
- "echo '*** ***'"
- "'echo *** DNF UPDATE COMPLETE - REBOOT NOW ***'"
- "echo '*** DNF UPDATE COMPLETE - REBOOT NOW ***'"
- "echo '*** ***'"
- "echo '*** ***'"
- "echo '***************************************************************************'"