adamant-kite-43734
07/21/2023, 2:27 PMadventurous-battery-36116
07/23/2023, 1:21 PMmillions-ocean-48249
07/24/2023, 1:29 PM"guestinfo.interface.0.ip.0.address:ip:vswitch-pg""guestinfo.interface.0.ip.0.address=ip:vswitch-pg"adventurous-battery-36116
07/24/2023, 1:43 PMmillions-ocean-48249
07/25/2023, 8:44 PMfailureMessage": "Failure detected from referenced resource <http://rke-machine.cattle.io/v1|rke-machine.cattle.io/v1>, Kind=VmwarevsphereMachine with name \"test-blue-control-6ca3f5f1-wqzgg\": [cmdCreateInner] could not alter cloud-init file: existing userdata file does not begin with '#!' or '#cloud-config'"#cloud-config
write_files:
- content: |
    #!/bin/bash
    vmtoolsd --cmd 'info-get guestinfo.ovfEnv' > /tmp/ovfenv
    IPAddress=$(sed -n 's/.*Property oe:key="guestinfo.interface.0.ip.0.address" oe:value="\([^"]*\).*/\1/p' /tmp/ovfenv)
    SubnetMask=$(sed -n 's/.*Property oe:key="guestinfo.interface.0.ip.0.netmask" oe:value="\([^"]*\).*/\1/p' /tmp/ovfenv)
    Gateway=$(sed -n 's/.*Property oe:key="guestinfo.interface.0.route.0.gateway" oe:value="\([^"]*\).*/\1/p' /tmp/ovfenv)
    DNS=$(sed -n 's/.*Property oe:key="guestinfo.dns.servers" oe:value="\([^"]*\).*/\1/p' /tmp/ovfenv)
    cat > /etc/netplan/01-netcfg.yaml <<EOF
    network:
      version: 2
      renderer: networkd
      ethernets:
        ens224:
          addresses:
            - $IPAddress/24
          gateway4: $Gateway
          nameservers:
            addresses : [$DNS]
    EOF
    sudo netplan apply
  path: /root/network_config.sh
  permissions: '755'
- content: |
    network: {config: disabled}
  path: /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
  permissions: '644'
- content: |
    net.ipv4.conf.all.forwarding=1
    net.ipv6.conf.all.forwarding=1
  path: /etc/sysctl.d/90-rke2.conf
  permissions: '644'
users:
  - default
  - name: username
    plain_text_passwd: 'passwordhere'
    shell: /bin/bash
    groups: wheel
    sudo: ALL=(ALL) NOPASSWD:ALL
    ssh_authorized_keys:
      - ecdsa-sha2-nistp521 <keygohere>
runcmd:
  - bash /root/network_config.shadventurous-battery-36116
07/25/2023, 10:05 PMexisting userdata/etc/sysctl.d/90-rke2.confadventurous-battery-36116
07/25/2023, 10:14 PMwrite_files:
- path: /etc/cool/example/file
  defer: true
  permissions: "0600"
  content: ${jsonencode(script_file)}millions-ocean-48249
07/26/2023, 2:15 PMmillions-ocean-48249
07/26/2023, 2:15 PMmillions-ocean-48249
07/26/2023, 2:57 PMmillions-ocean-48249
07/26/2023, 6:24 PMfile("${path.module}/files/cloud-init.yaml")file("files/cloud-init.yaml")