I am trying to launch an aws ec2 instance with coreos, providing a cloud-config, which just ignores some parts like putting an rsa_private_key or runcmd. Anyway, the hostname has been set successfully though, so the config was basically processed.
I broke down the whole config to the most simple thing and validated it with the coreos validator which tells me Line 5:unrecognized key "runcmd".
#cloud-config
hostname: "node01"
runcmd:
- touch /test.txt
I can't see any syntax error, what's wrong here?
For completeness, here's my whole cloud-config.yml: http://pastebin.com/YnrWqj7G
The original version of cloud-init is written in python.
CoreOS implemented their version in Go and it doesn't support all the same features. In fact, it also supports things that the python version doesn't that relate specifically to CoreOS. runcmd is not one of the supported features.
What is supported is listed here.
To run a cmd you'd have to drop in a unit file and run that.