“Skipping: No Hosts Matched” when trying to run a playbook through Automation Controller
Environment
- Red Hat Ansible Automation Platform 2.x
Issue
- “Skipping: No Hosts Matched” OR "ERROR! Specified inventory, host pattern and/or --limit leaves us with no hosts to target." when trying to run a playbook through Automation Controller
Resolution
Review and make sure that the host patterns used by the hosts declaration in your play matches the group or host names in the inventory. The host patterns are case-sensitive.
Make sure that your group names have no spaces. Modify them to use underscores or no spaces to ensure that the groups are correctly recognized.
If you have specified a limit in the job template, make sure that it is a valid limit and that it matches something in your inventory.
Root Cause
- Host information provided in the playbook should match with the attached inventory in AAP JT and if the host details are not present in the inventory, it will result in "No host matched"
Diagnostic Steps
- Check the playbook where the declaration host information has been listed.
- Check the inventory and compared the values.
- After analyzing the playbook and the inventory, the host detail most likely must not be added in the inventory used.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments