1

我正在尝试使用 --set-string 将 json 文件分配给 ansible 循环内的变量,然后运行 ​​helm upgrade 命令。但它给了 -

此命令需要 2 个参数:版本名称、图表路径\n错误:插件 \"tiller\" exited with error" 错误。

  {% for file in v.value.files %}
  --set-string config[{{ loopOut.index0 }}].files[{{ loop.index0 }}].name={{ file }}
  {% set args = args|combine(v.value.args) %}
  --set-string config[{{ loopOut.index0 }}].files[{{ loop.index0 }}].value=
  {{ lookup('file','../files/initData.json')| from_json }}
  {% endfor %}

其中 loopOut 是外部循环变量,其中我有这个当前循环。我在这里做错了什么?我什至试着把

 "{{ lookup('file','../files/initData.json')| from_json }}" in quotes

但这也无济于事。

4

0 回答 0