【发布时间】:2019-10-02 08:52:24
【问题描述】:
我正在尝试在 awx 中提出一个主机过滤器查询,该查询能够过滤包含在我的库存变量字段中的键中的值。
我的变量字段如下所示:
{
"variables": "{..., \"labels\": {\"automation\": \"awx\"}, ...}"
}
我当前的主机过滤器是这样的:
https://my-awx.com/api/v2/hosts/?host_filter=variables__icontains=automation
使用上面的过滤器,我至少能够接收到相应的实例,但是我希望能够过滤超过automation。最终,我希望接收所有 automation 标签具有密钥 awx 的实例,并将它们集成到智能库存中。
还有一个问题:有没有比https://docs.ansible.com/ansible-tower/latest/html/towerapi/filtering.html 更好的文档?我觉得它缺少我的问题中包含的详细信息。
最好的问候, 静止不动
【问题讨论】:
标签: ansible ansible-inventory ansible-tower ansible-awx