Project

General

Profile

Actions

Bug #29111

closed

Generating Ansible Inventory includes newlines in response

Added by Ondřej Pražák almost 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
Triaged:
No
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.


Files

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

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
Actions #2

Updated by Ondřej Pražák almost 5 years ago

  • File deleted (json-inventory.png)
Actions #3

Updated by Ondřej Pražák almost 5 years ago

  • File json-inventory.png added
Actions #4

Updated by Ondřej Pražák almost 5 years ago

  • File deleted (json-inventory.png)
Actions #6

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
Actions #7

Updated by The Foreman Bot almost 4 years ago

  • Fixed in Releases 2.4.0 added
Actions #8

Updated by Anand Agrawal almost 4 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF