Awesome Thanks Kai, This works like a charm. Sorry I misunderstood your 
statement earlier and trying to split that ahead of my execution of 
client_hotfix.sql

On Tuesday, February 27, 2018 at 11:54:35 AM UTC-6, Kai Stian Olstad wrote:
>
> On Tuesday, 27 February 2018 18.39.22 CET Raja Shekar wrote: 
> > 
> >   - name: Update the Client Schema 
> >     shell: source ~/.bash_profile && sqlplus -S '{{ item.1 }}/{{ item.2 
> > }}@{{ item.4 }}' @"roles/oracle-sql/files/Scripts/client_hotfix.sql" {{ 
> > item.0 }} 
> >     with_items: "{{ groups_out.stdout_lines }}" 
> >     delegate_to: localhost 
> > 
> > 
> > How ever split option not working for me, Can you please provide sample 
> > snippet if possible for me to fetch individual items and split with 
> comma 
> > based. 
> > Your help is highly appreciated on this. 
>
> You just need to replace your items like this: 
>
>   - name: Update the Client Schema 
>     shell: source ~/.bash_profile && sqlplus -S '{{ item.split(",").1 
> }}/{{ item.split(",").2 }}@{{ item.split(",").4 }}' 
> @"roles/oracle-sql/files/Scripts/client_hotfix.sql" {{ item.split(",").0 }} 
>     with_items: "{{ groups_out.stdout_lines }}" 
>     delegate_to: localhost 
>
>
> -- 
> Kai Stian Olstad 
>

-- 
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/f1e51a0a-53e1-4325-b953-71d5f1bc4720%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to