Sorry fat fingers
Thank you for your reply.
The objective is to compile a list of variables from files in a directory
without using the merge behaviour. In my example I use with_items but it
should be with_fileglob
example
var1:
On Monday, February 8, 2016 at 10:56:06 PM UTC+1, DomaNitro wrote:
>
> Thank you for your reply.
>
> The objective is to compile a list of variables from files in a directory
> without using the merge behaviour. In my example I use with_items but it
> should be with_fileglob
>
> my_var:
>>
>>
>> var1:
>
>
> example.
> va
>
> Now
>
> On Monday, February 8, 2016 at 9:56:18 PM UTC+1, Brian Coca wrote:
>>
>> I'm not sure that what you are doing is right, no need to access
>> through facts, which would prevent it from templating (security
>> issue).
>> This example shows that the variable substitution DOES work, as long
>> as you access it directly.
>>
>> vars.yml
>> composed_var: "{{test1}}"
>>
>> play:
>> ---
>> - hosts: localhost
>> gather_facts: false
>> vars:
>> test1: [1,2,3]
>> tasks:
>>
>> - include_vars: "{{item}}"
>> with_items:
>> - vars.yml
>>
>> - debug: var=composed_var
>>
>>
>> output:
>> _____________________
>> < TASK [include_vars] >
>> ---------------------
>> ok: [localhost] => (item=vars.yml)
>> ______________
>> < TASK [debug] >
>> --------------
>> ok: [localhost] => {
>> "composed_var": [
>> 1,
>> 2,
>> 3
>> ]
>> }
>>
>>
>>
>> --
>> Brian Coca
>>
>
--
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/f448dd84-de50-4a8e-9060-90859c9f09ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.