Community_vmware.yml - filtering by createDate

Hi!
I need to create an inventory which consists vms that created past week. config.createDate format is ansible_date_time.iso8601

Do you have any suggestion to do that?

filters:
   - runtime.powerState == "poweredOn"
   - config.guestId is not match('windows*')
   - config.name is match('test*')
   - config.createDate >= "{{ '%Y-%m-%dT%H:%M:%SZ'|strftime( (ansible_date_time.epoch|int) - (60*60*24*7)) }}"  #not works
  # - config.createDate <= "{{ ansible_date_time.iso8601 }}" #gathered all vms as expected
  # - config.createDate >= "2026-03-25T00:00:00Z" #works but need to dynamically update

I don’t know how to do it. However, are we talking about community.vmware.vmware_vm_inventory here?

If so, please note that this has been deprecated in 5.4.0 and will be removed in 7.0.0 in half a year or so. I dont know how to do it with vmware.vmware.vms, either, but maybe you should try to find a solution for this plugin. It would be more future-proof.