On 18 April 2015 at 17:19, Anand Buddhdev <[email protected]> wrote:
> On Saturday, 18 April 2015 17:01:16 UTC+2, Serge van Ginderachter wrote:
>
> Hi Serge,
>
> On 18 April 2015 at 15:51, Anand Buddhdev <[email protected]> wrote:
>>
>>> 1. the order of the names in group_names does not match the inventory
>>> parent-child order; and
>>>
>>
>> There is no way of knowing that, as the inventory does not export that
>> information to other ansible parts
>>
>
> Ah, that's a bummer. Is there any way to get the inventory to expose this
> information for lookup plugins to use?
>
No. There is nothing in the api that allows this without an update to the
core code.
It is though something to consider, when we have a look at the inventory
after 2.0.
>
>> 2. I don't know how to prefix "group_files" to each group name, in order
>>> to keep my group files in their own directory.
>>>
>>
>> perhaps I miss your point but
>>
>>
>> - paths: "group_files/{{ group_names }}"
>> files:
>> - myfile
>>
>
> This can't work. The "paths" attribute expects a list. By passing it
> "group_files/{{ group_names }}", it turns into the string:
>
> "group_files/['group1', 'group2', 'group3']"
>
> This is a weird, but valid path, so ansible will look in there, but not
> find anything.
>
Yes, sorry, I missed that obviously.
Slow Saturday here :)
This would require the possibility to redifine lists. Allowing set_fact to
work with loops. Which is not possible either now, but will also hopefully
become a thing post 2.0
Serge
--
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/CAEhzMJD22bN-VaDS5gHQ3ar0E8bnqa9BUVSKkSogfu8o_nZc5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.