rescritura netplan

This commit is contained in:
trigkeyb
2025-02-01 17:33:01 +01:00
parent 0e723ee13f
commit 6d31dc1584
3 changed files with 24 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
# Crea variables # Crea variables
# ID de VM # ID de VM
VMID="919200" VMID="920000"
# lugar de almacenamiento para el disco # lugar de almacenamiento para el disco
### VMSTORAGE="VMs_storage-E" ### VMSTORAGE="VMs_storage-E"

10
clonar/50-cloud-init.yaml Normal file
View File

@@ -0,0 +1,10 @@
network:
version: 2
renderer: networkd
ethernets:
default:
match:
name: e*
dhcp4: yes
dhcp-identifier: mac

View File

@@ -27,6 +27,19 @@ ssh_pwauth: true
hostname: $VMHOST hostname: $VMHOST
manage_etc_hosts: true manage_etc_hosts: true
fqdn: $VMHOST fqdn: $VMHOST
write_files:
- path: /etc/netplan/50-cloud-init.yaml
content: |
network:
version: 2
renderer: networkd
ethernets:
default:
match:
name: e*
dhcp4: yes
dhcp-identifier: mac
runcmd: runcmd:
- cd /root - cd /root
- git clone https://git.lfgut.duckdns.org/luis/infra_cloudinit.git - git clone https://git.lfgut.duckdns.org/luis/infra_cloudinit.git