title: Ansible is not picking the group_vars and host_vars
body: <p>I am new to Ansible and couldn't figure out why the playbook is not picking up the group_vars/ and host_vars I have defined.  According to the document:</p>
  <blockquote>
  <p>You can also add group_vars/ and host_vars/ directories to your playbook directory. The ansible-playbook command looks for these directories in the current working directory by default.</p>
  </blockquote>
  <p>My playbook, inventory, and other files structure are quite simple.  It should be matching the default.</p>
  <p><a href="https://i.stack.imgur.com/2tLSB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2tLSB.png" alt="enter image description here" /></a></p>
  <p>Inventory file:</p>
  <pre><code>dummy
  
  [spider]
  s0ra
  s0ra_slave
  </code></pre>
  <p>The playbook:</p>
  <pre class="lang-yaml prettyprint-override"><code>- name: base mix release upgrade Prod.
    hosts: spider
    gather_facts: false
  
    # vars_files:
    # - vars/s0ra_sup.yaml
  
    tasks:
      - name: check release bin
        stat:
          path: &quot;{{ sh_lastrel }}&quot;
        register: rel_bin
  </code></pre>
  <p>When I tried to run the playbook by <code>ansible-playbook -i inventory.ini mix_upgrade.yaml</code>, it complains:</p>
  <pre class="lang-sh prettyprint-override"><code>PLAY [base mix release upgrade Prod.] **********************************************************************************
  
  TASK [check release bin] ***********************************************************************************************
  fatal: [s0ra]: FAILED! =&gt; {&quot;msg&quot;: &quot;The task includes an option with an undefined variable. 
  The error was: 'sh_lastrel' is undefined\n\n
  The error appears to be in 'xxx/ansible/mix_upgrade.yaml': line 19, column 7, but may\n
  be elsewhere in the file depending on the exact syntax problem.\n\n
  The offending line appears to be:\n\n\n
      - name: check release bin\n      ^ here\n&quot;}
  
  PLAY RECAP *************************************************************************************************************
  s0ra                       : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
  </code></pre>
  <p>But the <code>sh_lastrel</code> is defined in <code>spider.yaml</code> actually.  I don't know why it is not loaded.  I tried to turn on -v mode but it does not seem to have more debugging info.  Any hint of the cause or how to further debug is greatly appreciated.</p>
  <p>My ansible version is as below:</p>
  <pre><code>╰─ ansible --version                                                                                   ✔  22:01:57 
  ansible 2.9.9
    config file = None
    configured module search path = ['/Users/kenchen/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
    ansible python module location = /Users/kenchen/.pyenv/versions/3.8.2/lib/python3.8/site-packages/ansible
    executable location = /Users/kenchen/.pyenv/versions/3.8.2/bin/ansible
    python version = 3.8.2 (default, May 18 2020, 00:02:00) [Clang 10.0.1 (clang-1001.0.46.4)]
  </code></pre>