Without some examples of what the variables are I'm afraid I can't provide
further help.

The looping and such is pretty straightforward so it would be easy to offer
examples.




On Thu, Jul 3, 2014 at 9:57 AM, jepper <[email protected]> wrote:

> I'm frequently finding myself at lost in jinja2. Petros example worked ( i
> can't see it here!?!) , and I'm back on track - thanks!
>
> The composite queues are fuse mq queues our infrastructure can subscribe
> to. Physical queues forward copies of messages, logstash or mule for
> example.
>
>
> On Thursday, 3 July 2014 14:46:51 UTC+1, Michael DeHaan wrote:
>
>> Jinja2 questions should be pretty easy, though to understand better, what
>> are the variable inputs coming into the template?
>>
>>
>>
>>
>> On Thu, Jul 3, 2014 at 7:46 AM, jepper <[email protected]> wrote:
>>
>>>  I have to write a template so that I can produce the following - queue
>>> physicalName can vary in quantity, and may have 1 2 or 3 entries typically.
>>> This seems to be the challenge. I can do a more static version with - {
>>> 'x':'y', 'z':'a' } but then I can't figure out how to dynamically list more
>>> than 1 entry for physicalName without affecting every line in my output - I
>>> have 30 queues to set up like this.
>>>
>>>                     <compositeQueue name="1P.EMAIL" forwardOnly="false">
>>>                         <forwardTo>
>>>                             <queue physicalName="1P.LOGSTASH"/>
>>>                         </forwardTo>
>>>                     </compositeQueue>
>>>                     <compositeQueue name="1P.IP_EVT" forwardOnly="false">
>>>                         <forwardTo>
>>>                             <queue physicalName="1P.LOGSTASH"/>
>>>                             <queue physicalName="1P.SOMETHING"/>
>>>                         </forwardTo>
>>>                     </compositeQueue>
>>>
>>>                     <compositeQueue name="1P.IP_BLAH"
>>> forwardOnly="false">
>>>                         <forwardTo>
>>>                             <queue physicalName="1P.LOGSTASH"/>
>>>                             <queue physicalName="1P.FOO"/>
>>>                             <queue physicalName="1P.BAR"/>
>>>                         </forwardTo>
>>>                     </compositeQueue>
>>>
>>> I'm at loss how to do this. I could paste numerous examples of what I've
>>> done, but I feel it's a tad pointless as I feel I'm so far away from having
>>> something remotely credible. Sorry!
>>>
>>> --
>>> 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/827ccfb5-5751-4fb7-892e-
>>> 09f0aea5db71%40googlegroups.com
>>> <https://groups.google.com/d/msgid/ansible-project/827ccfb5-5751-4fb7-892e-09f0aea5db71%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> 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/b75e8181-af03-4c0e-ab26-7a47140e4bb9%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/b75e8181-af03-4c0e-ab26-7a47140e4bb9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> 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/CA%2BnsWgxodCA88bKQL_Uq9_AaqzVNFLB0KFnNn%3D6MynmK_me5VA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to