Satellite 6 inventory sync fails in Ansible Automation Platform with "TypeError: the JSON object must be str, bytes or bytearray, not list" in redhat.satellite foreman plugin
Issue
-
Satellite 6 inventory synchronization fails in Automation Controller when the inventory source uses the
satellite6(foreman) plugin and the Reports API.[WARNING]: * Failed to parse /runner/inventory/foreman.yml with auto plugin: the JSON object must be str, bytes or bytearray, not list File ".../redhat/satellite/plugins/inventory/foreman.py", line 438, in _post_request self._cache[self.cache_key][url] = json.loads(response.json()) TypeError: the JSON object must be str, bytes or bytearray, not list -
The failure occurs during inventory update jobs that call the Satellite Ansible Inventory report (
report_data) path. Inventory sources that do not setuse_reports_api: falseuse this path by default.
Environment
- Red Hat Ansible Automation Platform 2.5, 2.6, 2.7
- Red Hat Satellite 6.19
- Execution environment:
ee-supported-rhel9(or equivalent) - Affected collection:
redhat.satelliteearlier than 5.13.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.