This means that you’re not encoding this command correctly into YAML. There must be no spaces at the front of here-document lines in the resulting multiline string in data representation. Check my example, and you can also use https://yaml-online-parser.appspot.com/ to check what your YAML is parsed into. See also the YAML 1.1 spec for syntax reference.