@符号在这个[@][] ansible代码中做了什么?

what does @ symbol do in this [@][] ansible code?

我想知道这行代码中的@符号和[@][]是做什么的?这正在 Ansible 中使用。谢谢。

json_query("response.result.job  |  [@][]")

全部代码:

- name: task1
        <removed for simplicity>
        cmd: 'show jobs all'
      register: all_jobs
      until: |
        all_jobs is not failed
        and (all_jobs.stdout | from_json | json_query("response.result.job|[@][]") | default([], true) | length > 0)
        and (all_jobs.stdout | from_json | json_query("response.result.job|[@][]")
        | json_query("[?status != 'FIN']") | length == 0)
      retries: 60
      delay: 30

对于那些好奇的人,我想我找到了答案。这都是关于 jmespath 的。 @ 是当前节点。 [] 将展开一个列表。 [][] 将展开嵌套列表。 [@][] 将平坦的二级列表。要了解这一点,请转到下面的 link。那里有例子。

https://jmespath.org/tutorial.html