On Wed, Jul 29, 2020 at 7:15 PM Kelly Brazil <kellyjonbra...@gmail.com> wrote:
>
> Hi everyone!
>
> I'm not a day-to-day user of Ansible, but I am the developer of a tool called 
> JC that JSONifies the output of many commands and file-types and I got some 
> feedback that it might be good to integrate JC into Ansible as a plugin so 
> admins can execute arbitrary commands on the remote devices and receive 
> structured data back.
>
> I'm reading the dev docs and it looks like something like this would be a 
> Filter Plugin. Is that correct?
>
> JC is written in Python (only supports Python 3.6+). JC supports 55 command 
> and file-type parsers that run on Linux, macOS, and FreeBSD.
>
> Is this something that would have any real-world use-cases? I heard a 
> use-case would be for gathering data on devices that don't have Python 
> installed on them since the filter would be run on the controller. Would it 
> be relatively simple to wrap JC into the appropriate plugin type?
>
> https://github.com/kellyjonbrazil/jc
>
> I'm happy to start working on this, but want to make sure I'm barking up the 
> right tree.

Hello Kelly!

Thank you for reaching out, the timing is perfect because I was just
discussing the possibility of using jc as the backend for something
the other day in a discussion about parsing unstructured output into
structured data (big fan of your work by the way).

I'd love to have JC as a filter plugin in the ansible.posix
Collection[0]! Thank you for suggesting it.

I'd also like to explore the idea of a module_util that provided the
main integration interface for modules[1] to utilize JC for backend
processing of data coming from arbitrary commands run by the
module_util basic cli helper functions[2] such as run_command.
However, for the use case of the module_util we'd have to consider
vendoring JC into that Ansible Collection so that it may be properly
bundled and sent to the remote nodes as part of the AnsiballZ
payload[3] without requiring JC to be installed on every remote node
under Ansible's management.

Let me know your thoughts, I look forward to continuing this discussion.

Thank you,
-AdamM

[0] - https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html
[1] - 
https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_general.html
[2] - 
https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/basic.py
[3] - 
https://docs.ansible.com/ansible/2.9/dev_guide/developing_program_flow_modules.html#ansiballz

>
> Thanks,
> Kelly
>
> --
> 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/de9e1a35-8491-4b3a-b8ac-52e2554c1fbdo%40googlegroups.com.



-- 
Adam Miller (He/Him)
Senior Principal Software Engineer
Ansible Engineering, Red Hat Inc.
RHCP# 110-008-810
Mobile: (817) 205-3226
GitHub: maxamillion

-- 
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/CAH-D1xfWVhxyQfy5JvBikCTGAUy_sDk1m-%2BeRhYpEV5wewgykA%40mail.gmail.com.

Reply via email to