I am a big fan of Ansible automation: its simplicity, the ease of developing and testing playbooks, the fact that you can run playbooks on any machine - there is no dedicated server installation required.
When you need to split a text file by lines or columns there are plenty of ways to accomplish that. But what if you need to split a file by lines, where each record consists of multiple lines, and the number of lines in each record is not fixed?
I recently faced the challenge that I needed to modify the Ansible inventory (/etc/ansible/hosts) from within a playbook. My use-case was to build the node names and put them into the Ansible hosts file.