title: Error: Could not match supplied host pattern, ignoring: Switch (Skipping no host matched)
body: <p>I have created the basic ansible playbook. But when I run the playbook I am seeing the following error.</p>
  
  <pre><code>kiranm@kmalla-lt:~/ansible/playbooks$ ansible-playbook switch.yaml -i host,
  [WARNING]: Could not match supplied host pattern, ignoring: Switch
  
  PLAY [Switch] ******************************************************************************************************************
  skipping: no hosts matched
  
  PLAY RECAP *********************************************************************************************************************
  
  kiranm@kmalla-lt:~/ansible/playbooks$
  </code></pre>
  
  <p>My Playbook</p>
  
  <pre><code>---
  - hosts: Switch
    gather_facts: false
    connection: network_cli
    tasks:
     - name: Run show version on remote devices
       ios_command:
        commands: show run
        host: "{{ ansible_host }}"
        username: kmalla
        password: admin
        register: config
     - name: save output to /ansible/backups
       copy:
         content: "{{ config.stdout[0] }}"
         dest: "/ansible/backups/show_run_{{ inventory_hostname }}.txt"
  </code></pre>
  
  <p>Host File</p>
  
  <pre><code>[Switch]
  
  [ios]
  CL-QTS-R1-EDGE01 ansible_host=10.101.0.105
  
  
  [ios:vars]
  ansible_network_os=ios
  </code></pre>
  
  <p>Both my play book and hostfile are in same directory. Can someone please help me on the same where is my mistake. </p>