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/23387869.JKGBNZ1kiE%40x1.
For more options, visit https://groups.google.com/d/optout.

Reply via email to