diff --git a/clonar/0.crea_VM.sh b/clonar/0.crea_VM.sh index 40a99ba..93819cd 100755 --- a/clonar/0.crea_VM.sh +++ b/clonar/0.crea_VM.sh @@ -1,6 +1,6 @@ # Crea variables # ID de VM -VMID="919200" +VMID="920000" # lugar de almacenamiento para el disco ### VMSTORAGE="VMs_storage-E" diff --git a/clonar/50-cloud-init.yaml b/clonar/50-cloud-init.yaml new file mode 100644 index 0000000..f79adb9 --- /dev/null +++ b/clonar/50-cloud-init.yaml @@ -0,0 +1,10 @@ +network: + version: 2 + renderer: networkd + ethernets: + default: + match: + name: e* + dhcp4: yes + dhcp-identifier: mac + \ No newline at end of file diff --git a/clonar/genera_yaml_k8s.sh b/clonar/genera_yaml_k8s.sh index c26d9a7..52a1936 100755 --- a/clonar/genera_yaml_k8s.sh +++ b/clonar/genera_yaml_k8s.sh @@ -27,6 +27,19 @@ ssh_pwauth: true hostname: $VMHOST manage_etc_hosts: true 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: - cd /root - git clone https://git.lfgut.duckdns.org/luis/infra_cloudinit.git