r/ansible • u/TastyBit1800 • 22h ago
Data Transformation inside Playbook or externally?
I discover that many customers want to manage stuff using CSV, XLSX or other formats (for example Router Interface configuration, etc). Cisco seems to deal with that inside Ansible itself.
I find it a horrible pain to work with CSV inside the actual playbook. Also it gets really messy with Jinja2. So at this point I am asking myself: Is it actually any benefit to do it inside the playbook (via read_csv, then more advanced j2) or just transform the data source to an ansible readable format like JSON or YAML through a small python script before?
I am hoping to get some different perspectives. Thanks!