Learning Python vs. Ansible


This is more of a general question, but I’d be curious to get the input of the more competent Ansible community here.

In your opinion, how crucial is it to learn Python to get a good grasp on all things Ansible?

Any suggestions?

I’ve been using Ansible for about 5 years and have never written any Python for it. The roles and playbooks are YAML. The templates are Jinja2. Any script or binary you need to write can be written in whatever language you like.

I don’t think it’s important unless you want to work on Ansible itself. Just being able to install Python packages is enough.


I’ve only been using it for about a year now, and so far I agree. The only scripts I’ve written are Python scripts for data processing. I’ll have Ansible harvest data from a bunch of devices, the Python script then processes the results, and then Ansible executes a set of tasks based on the Python output.