Ansible:使用“包含”进行过滤

时间:2018-11-30 10:49:54

标签: amazon-ec2 ansible aws-cli

我正在搜索在今天的日期创建的AMIs ID
我的Ansible剧本是
--- - name: List of AMIs created today hosts: localhost tasks: - name: Get Today's date command: "date +'%Y-%m-%d'" register: result - name: Get AMIs List ec2_ami_facts: filters: owner: self creation_date: "{{ result }}"
Ansible需要确切的创建日期,例如 2018-11-30T08:33:08.000Z
但是result的值为 2019-11-30
我可以获取creation_date包含"2018-11-30"的AMI ID吗?

0 个答案:

没有答案