diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-07-11 17:00:21 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-07-11 17:00:21 -0400 |
commit | e90670e879cdd102e91f6b4c1909992ceb89fc7e (patch) | |
tree | 7feecaaff16fa3c33a632392d8832636fa17f0f6 /doc/examples | |
parent | 3ad885991d355d1a97c7b197e471369d676715fa (diff) | |
parent | 50a5728db977ec11f3448c473a396995ea29319e (diff) | |
download | vyos-cloud-init-e90670e879cdd102e91f6b4c1909992ceb89fc7e.tar.gz vyos-cloud-init-e90670e879cdd102e91f6b4c1909992ceb89fc7e.zip |
add write-files module for "injecting" files (LP: #1012854)
This implements file writing via cloud-config. It also
* adjusts other code to have user/group parsing in util instead
of in stages.py,
* renames decomp_str to decomp_gzip since it is more meaningful when named
that (as thats all it can decompress).
LP: #1012854
Diffstat (limited to 'doc/examples')
-rw-r--r-- | doc/examples/cloud-config-write-files.txt | 33 |
1 files changed, 33 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..9c4e3998 --- /dev/null +++ b/doc/examples/cloud-config-write-files.txt @@ -0,0 +1,33 @@ +#cloud-config +# vim: syntax=yaml +# +# This is the configuration syntax that the write_files module +# will know how to understand. encoding can be given b64 or gzip or (gz+b64). +# The content will be decoded accordingly and then written to the path that is +# provided. +# +# Note: Content strings here are truncated for example purposes. +write_files: +- encoding: b64 + content: CiMgVGhpcyBmaWxlIGNvbnRyb2xzIHRoZSBzdGF0ZSBvZiBTRUxpbnV4... + owner: root:root + path: /etc/sysconfig/selinux + perms: '0644' +- content: | + # My new /etc/sysconfig/samba file + + SMBDOPTIONS="-D" + path: /etc/sysconfig/samba +- content: !!binary | + f0VMRgIBAQAAAAAAAAAAAAIAPgABAAAAwARAAAAAAABAAAAAAAAAAJAVAAAAAAAAAAAAAEAAOAAI + AEAAHgAdAAYAAAAFAAAAQAAAAAAAAABAAEAAAAAAAEAAQAAAAAAAwAEAAAAAAADAAQAAAAAAAAgA + AAAAAAAAAwAAAAQAAAAAAgAAAAAAAAACQAAAAAAAAAJAAAAAAAAcAAAAAAAAABwAAAAAAAAAAQAA + .... + path: /bin/arch + perms: '0555' +- encoding: gzip + content: !!binary | + H4sIAIDb/U8C/1NW1E/KzNMvzuBKTc7IV8hIzcnJVyjPL8pJ4QIA6N+MVxsAAAA= + path: /usr/bin/hello + perms: '0755' + |