Cloud config is not working at all from the command line with APIv2 on Ubuntu 18.04. Anyone experience this? Even this simple script doesn’t work:
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $MY_TOKEN" -d '{
"name": "myserver",
"region": "sfo2",
"size": "s-1vcpu-1gb",
"image": "ubuntu-18-04-x64",
"ssh_keys": ["XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX"],
"user_data": "#cloud-config
write_files:
- content |
This is a test file
path: /etc/cloud-config-test
permissions: '0600'
owner: root:root"
}' "https://api.digitalocean.com/v2/droplets"
At first glance, examining /var/log/cloud-init.log, and /var/log/cloud-init-output.log, reveals nothing about the ‘user-data:#cloud-config’ entry in my APIv2 POST. Due to their size I left them out. I would be happy to share them if needed.
Thanks
Click below to sign up and get $100 of credit to try our products over 60 days!
Running the same script below from the GUI does work, but from the command line in an http request as shown above it does not.
Thanks