title: "Could not resolve hostname" Ansible
body: <p>I have created my first ansible playbook according to <a href="http://abregman.com/2015/12/25/ansible-write-and-run-your-first-playbook/" rel="nofollow noreferrer">this tutorial</a>, so it looks like this:</p>
  
  <pre><code>---
  - hosts: hostb
    tasks:
        - name: Create file
          file:
              path: /tmp/yallo
              state: touch
  
  - hosts: my_hosts
    sudo: yes
    tasks:
        - name: Create user
          user:
              name: mario
              shell: /bin/zsh
  
        - name: Install zlib
          yum:
              name: zlib
              state: latest
  </code></pre>
  
  <p>However, I can not figure out which hosts I should put into my hosts file. I have something like this for now:</p>
  
  <pre><code>[my_hosts]
  hostA
  hostB
  </code></pre>
  
  <p>Obviously, it is not working and I get this:</p>
  
  <pre><code>ssh: Could not resolve hostname hostb: Name or service not known
  </code></pre>
  
  <p>So how should I change my hosts file? I am new to ansible so I would be very grateful for some help!</p>