Bug #29111
closedGenerating Ansible Inventory includes newlines in response
Description
Description of problem:
Ansible Inventory reports, print multiple blank lines in the output
How reproducible: Always
Output:
[root@foreman ~]# hammer report-template generate --name 'Ansible Inventory' --report-format json
[{"id":1,"name":"satellite.example.com","organization":"Redhat","location":"Pune","host_group":null,"host_collections":["hc","vvvv"],"ipv4":"192.168.122.2","subnet":null,"smart_proxies":["satellite.example.com"]},{"id":12,"name":"host.example.com","organization":"Redhat","location":"Pune","host_group":null,"host_collections":["hc","vvvv"],"ipv4":null,"subnet":null,"smart_proxies":["satellite.example.com"]},{"id":17,"name":"tower.example.com","organization":"Redhat","location":"Pune","host_group":"satellite","host_collections":["hc","vvvv"],"ipv4":"192.168.100.3","subnet":"example.com","smart_proxies":["satellite.example.com"]},{"id":21,"name":"capsule.example.com","organization":"Redhat","location":"Pune","host_group":"satellite","host_collections":["hc","vvvv"],"ipv4":null,"subnet":"example.com","smart_proxies":["satellite.example.com"]},{"id":31,"name":"xxxx.com-3","organization":"Redhat","location":"Default Location","host_group":null,"host_collections":["hc","vvvv"],"ipv4":null,"subnet":null,"smart_proxies":[]},{"id":34,"name":"rudy-liebe.example.com","organization":"Redhat","location":"Default Location","host_group":"satellite","host_collections":["hc","vvvv"],"ipv4":"192.168.100.26","subnet":"example.com","smart_proxies":["satellite.example.com"]},{"id":35,"name":"ansible-node1.example.com","organization":"Redhat","location":"Pune","host_group":"satellite","host_collections":["hc","vvvv"],"ipv4":"192.168.100.47","subnet":"example.com","smart_proxies":["satellite.example.com"]},{"id":36,"name":"ansible-master.example.com","organization":"Redhat","location":"Pune","host_group":"satellite","host_collections":["hc","vvvv"],"ipv4":"192.168.100.10","subnet":"example.com","smart_proxies":["satellite.example.com"]},{"id":41,"name":"darla-robideau.example.com","organization":"Redhat","location":"Pune","host_group":"satellite","host_collections":["hc","vvvv"],"ipv4":"192.168.122.40","subnet":"example.com","smart_proxies":["satellite.example.com"]},{"id":42,"name":"puppet.example.com","organization":"Redhat","location":"Pune","host_group":"satellite","host_collections":["hc","vvvv"],"ipv4":"192.168.122.18","subnet":"example.com","smart_proxies":["satellite.example.com"]}]
Expected:
It should not print blank lines in the output
This does not look like hammer issue since the new line characters are already included in the response.
Files