Hello all,
I have a play I want to run wich deletes all hosts matching a certain
criteria:
tasks:
- name: Delete unavailable nodes
zabbix_host:
server_url: http://zabbix.aa.net/zabbix
login_user: Admin
login_password: aq!
host_groups: Discovered hosts
status: disabled
state: absent
host_name: "{{ item }}"
with_items:
- ip-10-1-*-*.us-west-2.compute.internal
The above doesnt work, but if I list out the items
with_items:
- ip-10-1-65-27.us-west-2.compute.internal
- ip-10-1-65-28.us-west-2.compute.internal
- ip-10-1-65-37.us-west-2.compute.internal
then it works, but I want it to be dynamic and find all ips matching -
ip-10-1-*-*.us-west-2.compute.internal
any help please?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/dcd118b2-775b-44d3-baf5-713b9b0918be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.