标签:ansible-filter
-
ansible过滤器映射数组并放入json模板 - python
我有一个数组变量如下 registries: - type: primary host: r1.example.com - type: secondary host: r2.example.com 我只想从json.j2模板中的每个数组项呈现host属性。我在模板中尝试了以下方法: { "insecure-registries": {{ […]
我有一个数组变量如下 registries: - type: primary host: r1.example.com - type: secondary host: r2.example.com 我只想从json.j2模板中的每个数组项呈现host属性。我在模板中尝试了以下方法: { "insecure-registries": {{ […]