summaryrefslogtreecommitdiff
path: root/doc/examples/cloud-config.txt
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2010-02-19 01:54:49 -0500
committerScott Moser <smoser@ubuntu.com>2010-02-19 01:54:49 -0500
commitd24e24686e0aa40adbd2f31f29a61f02db838b00 (patch)
treebdb1d06025390d855fc5f3954edb09b73b205814 /doc/examples/cloud-config.txt
parent433db020a1d7a3165053a0a13b0dda22086ac71b (diff)
downloadvyos-cloud-init-d24e24686e0aa40adbd2f31f29a61f02db838b00.tar.gz
vyos-cloud-init-d24e24686e0aa40adbd2f31f29a61f02db838b00.zip
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.
Diffstat (limited to 'doc/examples/cloud-config.txt')
-rw-r--r--doc/examples/cloud-config.txt18
1 files changed, 18 insertions, 0 deletions
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 ]