#cloud-config
# ============================================================
# Nutanix SNC Boot Server — per-node cloud-init user-data
#
# Generated by: scripts/build-userdata.sh
# Do not edit manually — regenerate with build-userdata.sh
# ============================================================

# Root login enabled for ops access
disable_root: false

write_files:
  # ---- Boot server config ----
  - path: /etc/nutanix-boot/server.conf
    permissions: '0640'
    content: |
      # Nutanix SNC Boot Server configuration
      # Generated at deployment time

      BOOT_SERVER_IP=172.16.2.30
      BOOT_IFACE=bond0
      NETMASK=255.255.252.0
      GATEWAY=172.16.3.254
      NAMESERVER=213.186.33.99

      SUBNET_CIDR=172.16.0.0/22
      DHCP_POOL_START=172.16.2.100
      DHCP_POOL_END=172.16.2.199

      VERSION=7.5
      AHV_ISO=AHV-DVD-x86_64-11.0-1900.iso
      AHV_MD5=c472ae6584ef91b5bc89aad3bf7609e4
      NOS_TAR=nutanix_installer_package-release-ganges-7.5-stable-cd8cd937b6288cf2c58a44a0bc1c58d85bf5c0bb-x86_64.tar.gz

      WEBROOT=/var/www/html
      TMPL_DIR=/etc/nutanix-boot/templates

  # ---- Node registration list ----
  # Format: MAC HOST_IP CVM_IP HOSTNAME [NODE_POSITION] [RACK_ID] [VLAN]
  - path: /etc/nutanix-boot/nodes.conf
    permissions: '0640'
    content: |
      7c:8c:09:04:e9:94 172.16.0.71 172.16.1.71 nutanix-node1 A RACK01 1

runcmd:
  - /usr/local/bin/nutanix-first-boot.sh
