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
Updated by Ondřej Pražák almost 5 years ago
- File json-inventory.png added
- Subject changed from Generating Ansible Inventory includes newlines in response to Generating Ansible Inventory includes newlines in response
- Category changed from Statistics to Templates
Updated by Ondřej Pražák almost 5 years ago
- File json-inventory.png json-inventory.png added
Updated by The Foreman Bot almost 4 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8289 added
Updated by Anand Agrawal almost 4 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|540c577a30a4e2be500dc138d4a8435aa8c31139.