Hi all, 

like probably most of you, we have multiple servers with multiple 
application instances (Tomcat, Apache, ..) on it, for example structured 
like this:

[cae:children]
cae-1
cae-2

[cae-1]
pbdelsweb001.mydomain.com
[cae-2]
pbdelsweb002.mydomain.com


For each group we have a *.yml file at group_vars directoy in the inventory:

cae-1.yml:
---
cae_instance: 
- 
    index: _1_a
    port: 8700
- 
    index: _1_b
    port: 9700
- 
    index: _1_c
    port: 10700
- 
    index: _1_k
    port: 12700

All these instances are setup by a simple playbook:

- hosts: cae
  user: myuser

  vars_files:
    - vars/stage-{{stage}}.yml  

  roles:
    - { role: cae-tomcat, params: "{{ cae_instance }}" }

This is all fine - but now I have to fullfill the requirement to be able to 
address only the "_k" instances - or only the "_a" instances - that meens 
one or more instances out of the complete list.

Is there an option to "filter" the list of instances ? Something like 

  with_items
   - filter: (".*_k" ) 

Do I have to write my own Iterator(s) for this ?

Thanx for any hints, Torsten




-- 
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/fbbdc812-3908-43a8-921b-f7705a6314cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to