1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | write_files:
- path: /myfile
content: |
Hi
This has spaces
super huge
- path: /foobar
content: |
THis is foobar
Yaml loaded and dumped:
#!/usr/bin/env python2.7
import yaml, sys, pprint
if len(sys.argv) > 1:
y = yaml.load(open(sys.argv[1]))
else:
y = yaml.load(sys.stdin)
print yaml.dump(y, default_flow_style=False, indent=4)
Output:
write_files:
- content: 'Hi
This has spaces
super huge
'
path: /myfile
- content: 'THis is foobar
'
path: /foobar
|