#cloud-config # Example user-data that downloads and runs a script from a file server. # Use this so you can change first-boot behaviour without rebuilding the golden image. # Copy to boot partition as 'user-data' and set BOOTSTRAP_URL to your script URL. package_update: true package_upgrade: false packages: - curl # or wget if you prefer # Download script from file server and run it (runcmd runs after network is up) runcmd: - curl -fsSL "http://YOUR_FILE_SERVER/provisioning/bootstrap.sh" -o /tmp/bootstrap.sh - chmod +x /tmp/bootstrap.sh - /tmp/bootstrap.sh # Optional: remove after run # - rm -f /tmp/bootstrap.sh # Optional: finish cloud-init # - cloud-init single --name cc_final_message