[Help] Could not match supplied host pattern

I’m learning Ansible and other things from this guide https://github.com/Artemmkin/infrastructure-as-code-tutorial/blob/master/docs/06-ansible.md
Only problem is whenever I try and run deply.yml I get

`

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

[WARNING]: Could not match supplied host pattern, ignoring: raddit-app

PLAY [Deploy Raddit App] ***********************************************************************************************
skipping: no hosts matched

PLAY RECAP *************************************************************************************************************

`

I know this is probably caused by the fact the guide was written for 2.4 of Ansible but I’d like to update it to use 2.6 aka the latest.

I can post my hosts.yml deply.yml and ansiblecfg if needed, but all that same info is in the guide I linked.

Any help would be very much appreciated as I’m a noob when It comes to Ansible and I really want to learn it better.

I'm learning Ansible and other things from this guide
https://github.com/Artemmkin/infrastructure-as-code-tutorial/blob/master/docs/06-ansible.md
Only problem is whenever I try and run deply.yml I get
[WARNING]: provided hosts list is empty, only localhost is available. Note
that the implicit localhost does not match
'all'

[WARNING]: Could not match supplied host pattern, ignoring: raddit-app

PLAY [Deploy Raddit App]
***********************************************************************************************
skipping: no hosts matched

PLAY RECAP
*************************************************************************************************************

I know this is probably caused by the fact the guide was written for 2.4 of
Ansible but I'd like to update it to use 2.6 aka the latest.

I highly doubt it since this part haven't change for many versions.

I can post my hosts.yml deply.yml and ansiblecfg if needed, but all that
same info is in the guide I linked.

You would need to, if not we are left to speculate and guess and that is not very productive.

Any help would be very much appreciated as I'm a noob when It comes to
Ansible and I really want to learn it better.

The important thing when you need help is to provide as much information that you can.
A little to much information is better then to little.

ansible.cfg
`

[defaults]
inventory = ./hosts.yml
private_key_file = ~/.ssh/raddit-user
host_key_checking = False

`

deploy.yml
`

You are missing a colon after raddit-instance.

Ohhhh, this is why you don’t do this after 2am at night XD.

Sadly it’s still giving me that error even after I added the colon :/, clearly I’m missing something still

If all three files is in the same directory and you are in that directory when running "ansible-playbook deploy.yml" it should work.

Yeah all files are in the same directory and I’m running it from that directory.
Yet for some odd reason it’s still giving me that error, I’m wondering if I should setup a fresh vm with ansible to test it on that.
The error again just to show it’s the same

`

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

[WARNING]: Could not match supplied host pattern, ignoring: raddit-app

PLAY [Deploy Raddit App] ********************************************************************************************************************************************************************************************************************
skipping: no hosts matched

PLAY RECAP **********************************************************************************************************************************************************************************************************************************

`

Okay I manged to get it to work, For some reason on the ubuntu 18.04 version of windows subsystem for linux it just doesn’t work, but in a VM of ubuntu 18.04 it works fine