
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).
34 lines
1.1 KiB
YAML
34 lines
1.1 KiB
YAML
#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'
|
|
|