Re: [ansible-project] Loop files that will be used as variables

2023-06-19 Thread dudu.c...@gmail.com
Vladimir Botka‏@ Thank you - it works ב-יום ראשון, 18 ביוני 2023 בשעה 09:51:58 UTC+3, Vladimir Botka כתב/ה: > On Wed, 14 Jun 2023 04:07:38 -0700 (PDT) > "dudu.c...@gmail.com" wrote: > > > *My J2 file* > > > > select * from {{ item.id}} where {{ item.color}} > > > > *My input files* > >

Re: [ansible-project] Loop files that will be used as variables

2023-06-18 Thread Vladimir Botka
On Wed, 14 Jun 2023 04:07:38 -0700 (PDT) "dudu.c...@gmail.com" wrote: > *My J2 file* > > select * from {{ item.id}} where {{ item.color}} > > *My input files* > > *File-1.yml :* > Id: 1 > color: blue > > *File-2**.yml** :* > Id: 2 > color: red > > *My Playbook – that is not working. *

Re: [ansible-project] Loop files that will be used as variables

2023-06-18 Thread Dick Visser
On Sun, 18 Jun 2023 at 07:43, dudu.c...@gmail.com wrote: > Sorry - But i didnt fully understand your question > > My input files are static - The problem that i'm trying to solve is how > to loop "vars_file" for the same task > What are you trying to achieve with the playbook? > > ב-יום

Re: [ansible-project] Loop files that will be used as variables

2023-06-17 Thread dudu.c...@gmail.com
Sorry - But i didnt fully understand your question My input files are static - The problem that i'm trying to solve is how to loop "vars_file" for the same task ב-יום רביעי, 14 ביוני 2023 בשעה 22:01:56 UTC+3, Will McDonald כתב/ה: > I think this answer might give you a pointer in the right

Re: [ansible-project] Loop files that will be used as variables

2023-06-14 Thread Will McDonald
I think this answer might give you a pointer in the right direction: https://stackoverflow.com/a/52237675 It should work, but there could be a better/simpler way to do this. Do you control the generation of the files that provide your source variables? What's the *actual *problem you need to

[ansible-project] Loop files that will be used as variables

2023-06-14 Thread dudu.c...@gmail.com
Hi , I’m using the template module that takes a J2 template and update the relevant fields. My problem is When I want to create a file per file input should be used as variable – I’m actually need to understand how to loop file that should be used as var files *My J2 file* select *