Not exactly...I want each condition to be a regex on the output of the original 
command (which also contains a lot of other text). That's why I was trying to 
use a "search" filter.


> On Oct 24, 2014, at 5:04 PM, Michael DeHaan <[email protected]> wrote:
> 
> sounds like you mean do something like:
> 
> when: a in ['x','y','z']
> 
> or
> 
> when: x.foo in alist
> 
> ??
> 
> 
> 
> 
>> On Fri, Oct 24, 2014 at 3:50 PM, Jacob Weber <[email protected]> wrote:
>> Is it possible to write something like "when: a and b and c", but get the 
>> list [a,b,c] from a variable?
>> 
>> I have one command that outputs some data, which I register in a variable x. 
>> Then I want to see if all items from variable y are included in that output. 
>> If I were doing it manually, it might look like: "when x | search("a") and x 
>> | search("b") and x | search("c"). But I'd like that list to be dynamic.
>> 
>> Any way to do this?
>> -- 
>> 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/fd2bfa29-3a83-456c-8535-f76a15776f22%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Ansible Project" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/ansible-project/ZqpaIhwvT58/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CA%2BnsWgyw404FovJML2XeMOfG1XUVoUQmpFKP%2BSKRdjyVT2DeOg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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/A2A769D4-66C7-42AA-B738-B390A79B9137%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to