无法将多行字符串(私有 ssh 密钥)存储为 ansible 中的变量

pka*_*mol -1 ansible

我正在尝试将ssh私钥存储为ansible变量。

它位于加密文件中,或多或少像这样

my_private_key: |
-----BEGIN OPENSSH PRIVATE KEY-----

kd02ke0ke0k20ke0ke40430940943090494
[...]

Xekrfmfimimfimfeimiefmim4304309430943==

-----END OPENSSH PRIVATE KEY-----
Run Code Online (Sandbox Code Playgroud)

但是ansible执行失败,如下:

ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
JSON: Expecting value: line 1 column 1 (char 0)

Syntax Error while loading YAML.
  could not find expected ':'

The error appears to be in '/Users/pantelis/path/to/my/encrypted/file': line 6, column 1, but may
be elsewhere in the file depending on the exact syntax problem.
Run Code Online (Sandbox Code Playgroud)

我存储这个多行变量的方式有问题吗?

flo*_*ong 5

块值需要比键缩进得更远。

my_private_key: |
  -----BEGIN OPENSSH PRIVATE KEY-----
  kd02ke0ke0k20ke0ke40430940943090494
  Xekrfmfimimfimfeimiefmim4304309430943==
  -----END OPENSSH PRIVATE KEY-----
Run Code Online (Sandbox Code Playgroud)