Thanks for the quick answer Matt. For each ansible task, i want to get the module, parameters, etc. I want to tokenize the task body for ML purposes. Additionally, is there an AST (abstract syntax tree) for Ansible...?
On Monday, March 30, 2020 at 5:07:44 PM UTC+2, Matt Martz wrote: > > Ansible does not expose a python API for developers for this purpose. > Under the hood, it is pyyaml that parses the files. I don't know what your > end goal is, so I cannot really make any useful recommendation, other than > to use pyyaml. > > On Mon, Mar 30, 2020 at 9:09 AM Nemania Borovits <nemania...@gmail.com > <javascript:>> wrote: > >> Hello! I need to parse ansible files effectively. Is there any python >> library which i can use to parse .yml/.yaml files which contain ansible >> deployments...? Besides pyyaml or ruamel.yaml >> >> -- >> 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 ansibl...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-devel/8545abe9-c29a-4cab-9a0e-d7fe66712cd7%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-devel/8545abe9-c29a-4cab-9a0e-d7fe66712cd7%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Matt Martz > @sivel > sivel.net > -- 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/0700a738-4ee9-4845-8186-2da618fc5815%40googlegroups.com.