toYaml
template function and indentation
#3873
vbrand1984
started this conversation in
General
Replies: 1 comment 5 replies
-
We'd have to use In cases where consistent formatting is important, it's probably better to just round-trip the file with |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've noticed that the
toYaml
function puts 4 spaces per indentation level in its resulting yaml document. Though it doesn't go against the yaml specification (and chezmoi'stoYaml
inserts indentations correctly), but the standard de-facto is 2 spaces per nested level, and I wonder if this may cause issues when combining manually generated yaml text with template-generated fragments (currently I'm tinkering with Ansible and trying to manage its configuration with chezmoi).Beta Was this translation helpful? Give feedback.
All reactions