Why am I receiving "Failed to parse /runner/inventory/host with script plugin:"?

Solution Verified - Updated -

Issue

  • Executing job(s) results in a failed state and returns the following error:

    [WARNING]:  * Failed to parse /runner/inventory/hosts with script plugin:
    problem running /runner/inventory/hosts --list ([Errno 13] Permission denied:
    '/runner/inventory/hosts')
    [WARNING]:  * Failed to parse /runner/inventory/hosts with yaml plugin: We were
    unable to read either as JSON nor YAML, these are the errors we got from each:
    JSON: Expecting value: line 1 column 1 (char 0)  Syntax Error while loading
    YAML.   expected <block end>, but found ','  The error appears to be in
    '/runner/inventory/hosts': line 3, column 40, but may be elsewhere in the file
    depending on the exact syntax problem.  The offending line appears to be:  #
    -*- coding: utf-8 -*- print('{"all": {"hosts": ["localhost"]}, "_meta":
    {"hostvars": {"localhost": {"ansible_connection": "local",
    "ansible_python_interpreter": "{{ ansible_playbook_python }}",
    "remote_tower_enabled": "true", "remote_host_enabled": "true",
    "remote_host_id": 1}}}}')                                        ^ here We
    could be wrong, but this one looks like it might be an issue with missing
    quotes. Always quote template expression brackets when they start a value. For
    instance:      with_items:       - {{ foo }}  Should be written as:
    with_items:       - "{{ foo }}"
    [WARNING]:  * Failed to parse /runner/inventory/hosts with ini plugin: host
    range must be begin:end or begin:end:step
    [WARNING]: Unable to parse /runner/inventory/hosts as an inventory source
    ERROR! No inventory was parsed, please check your configuration and options 
    

Environment

  • Ansible Automation Platform 2.1
  • Red Hat Satellite 6

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