Error undefined method '#ip' for NilClass when trying to generate "Ansible - Ansible Inventory" report from a Red Hat Satellite 6.16

Solution Verified - Updated -

Issue

  • Soon after upgrading to Red Hat Satellite 6.16, The inventory plugin redhat.satellite.foreman has stopped working with the reports_api :

    # cat my.foreman.yml
    plugin: redhat.satellite.foreman
    
    url: https://satellite616.lab.example.com
    user: admin
    password: ******
    use_reports_api: true
    
    
    # ansible-inventory -i my.foreman.yml --list 
    [WARNING]: Failed to use Reports API, falling back to Hosts API: Error receiving inventory report from foreman. Please check foreman logs!
    {
        "_meta": {
    ...
    
  • It's not possible to generate a report from Ansible - Ansible Inventory report template as it fails with error undefined method '#ip' for NilClass, as well.

Environment

  • Red Hat Satellite 6.16+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content