Hi Akshay,

The jc filter in the community.general collection can turn INI and YAML files 
into objects you can use in your playbooks. 

https://blog.kellybrazil.com/2020/08/30/parsing-command-output-in-ansible-with-jc/

Kelly

> On Oct 19, 2020, at 5:56 AM, Akshay Kumar <akshayk...@gmail.com> wrote:
> 
> Hi Team,
> 
> I am trying to do the following , would appreciate if someone has a better 
> idea to workout for the scenario:
> 
> Cfg file-----
> 
> Section1:
>   ls:
>     first:
>       DirName:  /home/kumar/DevFileLocation
>       User:     kumar
> Section2:
>   rm:
>     first:
>       DirName:  /home/kumar/DevFileLocation
>       User:     kumar
> 
> for this cfg i want to write playbook which will pick up data form cfg file 
> and run list command in the playbook task.
> 
> Thanks
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ansible Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ansible-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/ansible-devel/926c5d4d-3951-4d08-af68-5e0b093a85d5n%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/2FD75AE2-64FE-4B0D-9535-7B3D561B4120%40gmail.com.

Reply via email to