Skipping: no hosts matched

1,207 views
Skip to first unread message

eclipx...@gmail.com

unread,
Aug 10, 2017, 9:52:43 PM8/10/17
to Ansible Project
Hi all,

I am in need of help/pointers from the community in setting up Ansible ansible 2.3.2.0 on ubuntu 14.04.

At the current stage it has been configure to retrieve the information from the remote server, but when I tried to do it through playbook (sudo ansible-playbook ubuntu14upgrade.yml) I get the following message "skipping: no hosts matched"

/etc/ansible/ansible.cfg is default settings

/etc/ansible/hosts has IP and hostname of the same remote server
eclipx@MELDC1LPSTST1V

The above remote server responds to "ansible all -m ping"  and other request.


If you receive the message “Skipping: No Hosts Matched” when you are trying to run a playbook through Tower, here are a few things to check:

• Make sure that your hosts declaration line in your playbook matches the name of your group/host in inventory exactly (these are case sensitive).

---
- hosts: MELDC1LPSTST1V
  remote_user: eclipx
  become: yes
  become_method: sudo
  become_user: su

  tasks:
    - name: install system updates for ubuntu systems
      apt: upgrade=dist update_cache=yes state=lastest
      when: ansible_distribution == "Ubuntu"

• If it does match and you are using Ansible Core 2.0 or later, check your group names for spaces and modify them to use underscores or no spaces to ensure that the groups can be recognized.

• Make sure that if you have specified a Limit in the Job Template that it is a valid limit value and still matches something in your inventory. The Limit field takes a pattern argument, described here: http://docs.ansible.com/intro_patterns.html


Please file a support ticket if you still run into issues after checking these options.

Lost & thanks for your time...


eclipx...@gmail.com

unread,
Aug 14, 2017, 2:28:28 AM8/14/17
to Ansible Project
Hi Ansible community,

Is anybody able to help out?

Kai Stian Olstad

unread,
Aug 14, 2017, 6:06:00 PM8/14/17
to ansible...@googlegroups.com
On 14. aug. 2017 08:28, eclipx...@gmail.com wrote:
> Hi Ansible community,
>
> Is anybody able to help out?

To me your post looks wired.
If you are using Tower the support is here
https://access.redhat.com/products/ansible-tower-red-hat#support

If you are not using Tower you should probably not read that documentation.

What you need is to read Ansible documentation, especially the one about
inventory
https://docs.ansible.com/ansible/latest/intro_inventory.html


--
Kai Stian Olstad

eclipx...@gmail.com

unread,
Aug 16, 2017, 3:42:18 AM8/16/17
to Ansible Project, ansible-pr...@olstad.com
Thanks Kai for your reply.

The Tower documentation was a reference to troubleshoot my problem through the steps they outline, the only reference to "Skipping: no hosts matched" from google search.
Reply all
Reply to author
Forward
0 new messages