Thanks Vladimir,   ... Very much helpful ..

On Friday, October 20, 2023 at 11:26:30 PM UTC+5:30 Vladimir Botka wrote:

> On Fri, 20 Oct 2023 08:40:56 -0700 (PDT)
> Veera <[email protected]> wrote:
>
> > the "cols" are printed as like below (not as [green, red, yellow, 
> > blue]).
> > ...
> > "msg": [
> > [
> > "green",
> > "toronto",
> > "English"
> > ],
> > [
> > "red",
> > "montreal",
> > "French"
> > ],
> > [
> > "yellow",
> > "mumbai",
> > "Hindi"
> > ],
> > [
> > "blue",
> > "dubai",
> > "Arabic"
> > ]
> > ]
>
> > > On Fri, 20 Oct 2023, 16:08 Vladimir Botka <[email protected]> wrote:
> > > 
> > >> msg: |-
> > >> color cities lang
> > >> green toronto English
> > >> red montreal French
> > >> yellow mumbai Hindi
> > >> blue dubai Arabic
>
> What you see depends on the callback. Try
>
> shell> ANSIBLE_STDOUT_CALLBACK=yaml ansible-playbook playbook.yml
>
> Learn about formatting:
>
> * Try filters: *to_yaml*, *to_nice_yaml*. Try the option *indent*
> * Try the filter *indent*
> * Try other callbacks
>
> Links:
>
>
> https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_filters.html#formatting-data-yaml-and-json
> https://jinja.palletsprojects.com/en/latest/templates/#jinja-filters.indent
> https://docs.ansible.com/ansible/latest/plugins/callback.html
> https://docs.ansible.com/ansible/latest/collections/index_callback.html
>
> https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-stdout-callback
>
>
> -- 
> Vladimir Botka
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/b1c3dc9e-7866-4379-a7be-dbb75632bd00n%40googlegroups.com.

Reply via email to