Re: [ansible-project] Ansible find module , can path parameter include regex ?

2018-05-27 Thread Saranya Nagaraj
Thank you Kai , I'll try that out. On May 25, 2018 11:43 PM, "Kai Stian Olstad" < ansible-project+l...@olstad.com> wrote: > On 25.05.2018 14:36, Saranya N wrote: > >> I'm trying to find files dit.xml under particular directories. >> >> Rather than mentioning the directories as a list like below

Re: [ansible-project] Capture the stdout result in a variable, using regex and pass it to the next task

2019-01-14 Thread Saranya Nagaraj
Thankyou Kai Stian , that worked ! On Jan 10, 2019 11:31 PM, "Kai Stian Olstad" < ansible-project+l...@olstad.com> wrote: On Thursday, 10 January 2019 18:48:19 CET Saranya N wrote: > One task in my playbook produces output sample of different types like below > > > stdout_lines > > ex: 1 > > [ >

Re: [ansible-project] Convert a text file with list of strings into yml help

2019-03-21 Thread Saranya Nagaraj
Thank you Kai. That helped. On Mar 20, 2019 2:04 AM, "Kai Stian Olstad" wrote: > On 19.03.2019 20:09, Saranya N wrote: > > I'm having a text file with lots of strings like below. > > > > Cat test.txt > > String1 > > String2 > > . > > . > > . > > Etc > > > > I literally have 2k of strings on

Re: [ansible-project] How to capture/filter stdout_lines

2019-04-11 Thread Saranya Nagaraj
Thankyou Sebastian On Apr 10, 2019 11:16 AM, "Sebastian Meyer" wrote: > On 10.04.19 04:38, Saranya N wrote: > > Stdout_lines that I get contains strings , json in different lines. > > > > I want to capture the last line and copy those contents to a a new Json > file. > > > > How do I capture

Re: [ansible-project] Choose inventory hosts.ini file based on condition

2019-06-03 Thread Saranya Nagaraj
Sorry that prod / Prod is a typo. I'm basically using same at both places. On Jun 3, 2019 5:38 PM, "Wawrzek Niewodniczanski" wrote: > On Tue, 28 May 2019 at 16:31, Saranya N wrote: > > > > I have different staging environments under inventory. > > > [...] > > Prod/ > >group_vars > >

Re: [ansible-project] Generate a sequence in a playbook using the inventory host group length

2019-04-23 Thread Saranya Nagaraj
Hi Brian, Thankyou for the response. This generates a list of numbers. But I want a string like this "0,1,2,3" I kind of tried python join n didn't work. Can you please assist. On Apr 23, 2019 7:48 AM, "Brian Coca" wrote: > mysequence: "{{range(0, groups['Test']|length + 1)|list }}" > > -- >

Re: [ansible-project] Generate a sequence in a playbook using the inventory host group length

2019-04-23 Thread Saranya Nagaraj
Thankyou much Kai On Apr 23, 2019 2:06 PM, "Kai Stian Olstad" wrote: > On 23.04.2019 10:20, Saranya Nagaraj wrote: > >> Hi Brian, >> Thankyou for the response. >> This generates a list of numbers. >> >> But I want a string like this "0,1,2