Project

General

Profile

Bug #29111

Generating Ansible Inventory includes newlines in response

Added by Ondřej Pražák about 1 year ago. Updated 3 months ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

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.

json-inventory.png View json-inventory.png 225 KB Ondřej Pražák, 02/21/2020 11:05 AM
Json inventory

Associated revisions

Revision 540c577a (diff)
Added by Anand Agrawal 3 months ago

Fixes #29111 - Ansible Inventory includes newlines in response (#8289)

History

#1 Updated by Ondřej Pražák about 1 year ago

  • Category changed from Statistics to Templates
  • Subject changed from Generating Ansible Inventory includes newlines in response to Generating Ansible Inventory includes newlines in response
  • File json-inventory.png added

#2 Updated by Ondřej Pražák about 1 year ago

  • File deleted (json-inventory.png)

#3 Updated by Ondřej Pražák about 1 year ago

  • File json-inventory.png added

#4 Updated by Ondřej Pražák about 1 year ago

  • File deleted (json-inventory.png)

#6 Updated by The Foreman Bot 3 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8289 added

#7 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 2.4.0 added

#8 Updated by Anand Agrawal 3 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF