I stumbled across this issue when trying to generate a dynamic inventory file in ansible. The host information was stored in MySQL table. Which looks like this.
Ip s