# ansible\_hosts issue with 2.9.2

**URL:** <https://forum.ansible.com/t/ansible-hosts-issue-with-2-9-2/31925>\
**Category:** Ansible Project\
**Created:** [January 7, 2020, 7:14pm UTC](https://forum.ansible.com/t/ansible-hosts-issue-with-2-9-2/31925 "2020-01-07T19:14:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrew\_Meyer1](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@Andrew\_Meyer1](https://forum.ansible.com/u/Andrew_Meyer1)\
**Post date:** [January 7, 2020, 7:14pm UTC](https://forum.ansible.com/t/ansible-hosts-issue-with-2-9-2/31925/1 "2020-01-07T19:14:30Z")

</div>

Hello, I recently have installed ansible 2.9.2 from pip3 on CentOS 8. Prior to that I was on whatever came from EPEL.

Right now I am having an issue no matter what playbook I run.

This is my output on just about any playbook I run.

`

[andrew@jump01 playbooks]$ ansible-playbook deploy\_grafana.yml -e ‘target\_servers=[mon01.asm.example.com](http://mon01.asm.example.com)’ -vvvvv  
ansible-playbook 2.9.2  
config file = None  
configured module search path = [‘/home/andrew/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]  
ansible python module location = /home/andrew/.local/lib/python3.6/site-packages/ansible  
executable location = /home/andrew/.local/bin/ansible-playbook  
python version = 3.6.8 (default, Oct 7 2019, 17:58:22) [GCC 8.2.1 20180905 (Red Hat 8.2.1-3)]  
No config file found; using defaults  
setting up inventory plugins  
host\_list declined parsing /etc/ansible/hosts as it did not pass its verify\_file() method  
Skipping due to inventory source not existing or not being readable by the current user  
script declined parsing /etc/ansible/hosts as it did not pass its verify\_file() method  
auto declined parsing /etc/ansible/hosts as it did not pass its verify\_file() method  
Skipping due to inventory source not existing or not being readable by the current user  
yaml declined parsing /etc/ansible/hosts as it did not pass its verify\_file() method  
Skipping due to inventory source not existing or not being readable by the current user  
ini declined parsing /etc/ansible/hosts as it did not pass its verify\_file() method  
Skipping due to inventory source not existing or not being readable by the current user  
toml declined parsing /etc/ansible/hosts as it did not pass its verify\_file() method  
[WARNING]: No inventory was parsed, only implicit localhost is available

[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match ‘all’

Loading callback plugin default of type stdout, v2.0 from /home/andrew/.local/lib/python3.6/site-packages/ansible/plugins/callback/default.py

PLAYBOOK: deploy\_grafana.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Positional arguments: deploy\_grafana.yml  
verbosity: 5  
connection: smart  
timeout: 10  
become\_method: sudo  
tags: (‘all’,)  
inventory: (‘/etc/ansible/hosts’,)  
extra\_vars: (‘target\_servers=[mon01.asm.example.com](http://mon01.asm.example.com)’,)  
forks: 5  
1 plays in deploy\_grafana.yml  
[WARNING]: Could not match supplied host pattern, ignoring: [mon01.asm.example.com](http://mon01.asm.example.com)

PLAY [[mon01.asm.example.com](http://mon01.asm.example.com)] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
skipping: no hosts matched

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

[andrew@jump01 playbooks]$

`

I have verified with ansible-config that the config is showing up.

`

[andrew@jump01 playbooks]$ ansible-config dump -c …/ansible.cfg |grep -i hosts  
DEFAULT\_HOST\_LIST(/home/andrew/automation/ansible/ansible.cfg) = [‘/home/andrew/automation/ansible/hosts/ansible\_hosts’]  
DISPLAY\_SKIPPED\_HOSTS(default) = True  
[andrew@jump01 playbooks]$

`

Should I file a bug?

The ansible.cfg is in my ~/automation/ansible/

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [January 7, 2020, 7:58pm UTC](https://forum.ansible.com/t/ansible-hosts-issue-with-2-9-2/31925/2 "2020-01-07T19:58:33Z")

</div>

> [andrew@jump01 playbooks]$ ansible-playbook deploy\_grafana.yml -e  
> 'target\_servers=mon01.asm.example.com' -vvvvv  
> ansible-playbook 2.9.2  
> &nbsp;&nbsp;&nbsp;config file = None

So it doesn't find any config file aka ansible.cfg

> &nbsp;&nbsp;&nbsp;configured module search path = ['/home/andrew/.ansible/plugins/modules',  
> '/usr/share/ansible/plugins/modules']  
> &nbsp;&nbsp;&nbsp;ansible python module location =  
> /home/andrew/.local/lib/python3.6/site-packages/ansible  
> &nbsp;&nbsp;&nbsp;executable location = /home/andrew/.local/bin/ansible-playbook  
> &nbsp;&nbsp;&nbsp;python version = 3.6.8 (default, Oct 7 2019, 17:58:22) [GCC 8.2.1  
> 20180905 (Red Hat 8.2.1-3)]  
> No config file found; using defaults

so default configuration is used.

> I have verified with ansible-config that the config is showing up.
> 
> [andrew@jump01 playbooks]$ ansible-config dump -c ../ansible.cfg |grep -i

If show because you say where it is with -c  
But ansible-playbook doesn't know that.

> hosts  
> DEFAULT\_HOST\_LIST(/home/andrew/automation/ansible/ansible.cfg) =  
> ['/home/andrew/automation/ansible/hosts/ansible\_hosts']  
> DISPLAY\_SKIPPED\_HOSTS(default) = True  
> [andrew@jump01 playbooks]$
> 
> Should I file a bug?
> 
> The ansible.cfg is in my ~/automation/ansible/

But you are in a different directory that ansible.cfg.  
ansible is only looking in four places an use the first one it finds.

[https://docs.ansible.com/ansible/latest/reference\_appendices/config.html#ansible-configuration-settings-locations](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings-locations)

- ANSIBLE\_CONFIG (environment variable if set)  
- ansible.cfg (in the current directory)  
- ~/.ansible.cfg (in the home directory)  
- /etc/ansible/ansible.cfg

So you need to adjust accordingly.
