diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-07-11 11:20:24 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-07-11 11:20:24 -0700 |
commit | eb939e7765f490529aade46e38ee0f85d8a911dd (patch) | |
tree | fff7fc071416d2e19c919bbe3136cfa3aff4ba15 /doc | |
parent | 7b24230437a27779bafa0828e73ab595c5aeb202 (diff) | |
download | vyos-cloud-init-eb939e7765f490529aade46e38ee0f85d8a911dd.tar.gz vyos-cloud-init-eb939e7765f490529aade46e38ee0f85d8a911dd.zip |
Adjust the decoding of the files that are given so that a canonicalize
happens first, which will examine the incoming encoding, and decide the
neccasary decoding types needed to get the final resultant string and
then use these normalized decoding types to actually do the final decode.
Also change the name of the config key that is looked up to 'write_files'
since 'files' is pretty generic and could have clashes with other modules.
Add an example that shows how to use this in the different encoding formats
that are supported.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/cloud-config-write-files.txt | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/examples/cloud-config-write-files.txt b/doc/examples/cloud-config-write-files.txt new file mode 100644 index 00000000..fb0c1541 --- /dev/null +++ b/doc/examples/cloud-config-write-files.txt @@ -0,0 +1,32 @@ +#cloud-config +# vim: syntax=yaml +# +# This is the configuration syntax that the write_files module +# will know how to understand, it can be given b64, b32, b16, or +# gz (or gz+b64) encoded strings which will be decoded accordingly +# and then written to the path that is provided. +# +# Note: Content strings here are truncated for example purposes. +# +write_files: +- content: CiMgVGhpcyBmaWxlIGNvbnRyb2xzIHRoZSBzdGF0ZSBvZiBTRUxpbnV4IG9u..... + encoding: b64 + path: /etc/sysconfig/selinux +- content: ' + + # My new /etc/sysconfig/samba file + + SMBDOPTIONS="-D" + + ' + path: /etc/sysconfig/samba +- content: H4sIADXC/U8C/+1Yf2wbVx1/d7YT122TQEMpadS6kgOZqL30J+..... + encoding: gz+b64 + path: /usr/bin/uptime +- content: BIRSAU3FOR2GS3THOMQGM33SEB2GQZJAINJE6TRAMRQWK3LPNYXAU=== + encoding: b32 + path: /etc/sysconfig/crond +- content: 0A232053657474696E677320666F7220746865204E4653206461656D6F6E2E0A + encoding: b16 + path: /etc/sysconfig/nfs + |