"skipping: no hosts matched" when provisioning Trellis to DO

Hi! I’ve finished my site in localhost with Trellis + Bedrock + Sage9 (works wonderfully) and now following the docs to provision and deploy to a fresh DO instance for staging.

However I’m stuck at the first provisioning part getting this cryptic error after running “sudo ansible-playbook server.yml -e env=staging”.

Has anyone encountered this and know what’s the cause?

PLAY [Ensure necessary variables are defined] *********************************************************************************

TASK [Ensure environment is defined] ******************************************************************************************
skipping: [localhost]

PLAY [Test Connection and Determine Remote User] ******************************************************************************
skipping: no hosts matched

PLAY [Install prerequisites] **************************************************************************************************
skipping: no hosts matched

PLAY [WordPress Server - Install LEMP Stack with PHP 7.1 and MariaDB MySQL] ***************************************************
skipping: no hosts matched

PLAY RECAP ********************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=0

Do you have the IP for your staging server defined in hosts/staging in your Trellis folder?

1 Like

What @alwaysblank said is the first thing to confirm… ideally it’s a hostname and not just an IP.

1 Like

Thanks guys!

The trouble came from me misunderstanding what should I put under [staging] and [web].

I had used the server IP for the [staging] and the hostname for [web]. Once I changed both to the hostname it started working. I guess it would work with using the IP for both as well, it seems it’s just important that they are the same.

1 Like

I’m facing the same issue now. My development environment working just fine and I want to provision and deploy it to a fresh AWS instance as a production environment. I’ve used AWS instance public DNS ip address as a production and web hosts but the console show me the same result like this topic headline. I’m using windows 10 as OS and use WSL for my local environment.

About AWS instance, I use Ubuntu 18.04 LTS (Bionic Beaver).

Thanks in advance.
Here is my console result screenshot