From d24e24686e0aa40adbd2f31f29a61f02db838b00 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Fri, 19 Feb 2010 01:54:49 -0500 Subject: add "runcmd" support in CloudConfig runcmd allows simple running of commands at rc.local like time frame see doc/examples/cloud-config.txt for more info. --- doc/examples/cloud-config.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'doc') diff --git a/doc/examples/cloud-config.txt b/doc/examples/cloud-config.txt index f4de88e8..49ee7b26 100644 --- a/doc/examples/cloud-config.txt +++ b/doc/examples/cloud-config.txt @@ -155,3 +155,21 @@ ssh_keys: # default: false (service available) disable_ec2_metadata: true +# run commands +# default: none +# runcmd contains a list of either lists or a string +# each item will be executed in order at rc.local like level with +# output to the console +# - if the item is a list, the items will be properly executed as if +# passed to execve(3) (with the first arg as the command). +# - if the item is a string, it will be simply written to the file and +# will be interpreted by 'sh' +# +# Note, that the list has to be proper yaml, so you have to escape +# any characters yaml would eat (':' can be problematic) +runcmd: + - [ ls, -l, / ] + - [ sh, -xc, "echo $(date) ': hello world!'" ] + - [ sh, -c, echo "=========hello world'=========" ] + - ls -l /root + - [ wget, "http://slashdot.org", -O, /tmp/index.html ] -- cgit v1.2.3