2

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

1 Answer 1

4

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.

2
  • naahrg, didn't consider that -.- I'll try to use units. thanks!
    – sgohl
    Oct 22, 2015 at 9:03
  • can you perhaps tell how I can make it to only execute actions via units at initialization time? (not everytime the machine boots up)
    – sgohl
    Oct 22, 2015 at 9:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .