盐州的特殊人物

时间:2016-01-18 10:20:07

标签: yaml salt-stack

我正在使用Salt,我必须在文件中添加一些文本,经过一些研究后我发现你可以使用file.append模块来实现。

我在文件中添加[text]之类的内容时遇到错误:

failed: could not found expected ':';at line x

州是:

file.append:
  - text: |
    blah blah blah
    [SSL]    <====================== Here is where it complains
    blah blah

我应该尝试使用[转义\字符之前或之后如何做到这一点?

1 个答案:

答案 0 :(得分:1)

问题是你的缩进。映射值必须缩进多于其键:

file.append:
  - text: |
      blah blah blah
      [SSL]
      blah blah