There isn't really an AST for Ansible.
Ultimately, there are ways to achieve this, they just aren't "supported".
You could use the Ansible code to do it, but you would need to understand
that it could break at any point in time without notification.
Or you could write your own tooling from scratc
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
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
wrote:
> He