a-chernykh / railsbox

Fast and easy Ruby on Rails virtual machines
https://railsbox.io
MIT License
320 stars 52 forks source link

Ansible shows 'skipping: no hosts matched' #12

Closed Tanete closed 9 years ago

Tanete commented 9 years ago

I proceed with this #10 on my Windows PC. And I re-run the vagrant provision commant. It showed this:

==> rails10-meetup: ==> rails10-meetup: PLAY [vm] ** ==> rails10-meetup: skipping: no hosts matched ==> rails10-meetup: ==> rails10-meetup: PLAY [all] *** ==> rails10-meetup: ==> rails10-meetup: TASK: [apt_proxy | Setup apt-get proxy] **** ==> rails10-meetup: skipping: [127.0.0.1] ==> rails10-meetup: ==> rails10-meetup: TASK: [apt update_cache=yes] * ==> rails10-meetup: ok: [127.0.0.1] ==> rails10-meetup: ==> rails10-meetup: PLAY [mysql] *** ==> rails10-meetup: skipping: no hosts matched ==> rails10-meetup: ==> rails10-meetup: PLAY [application] * ==> rails10-meetup: skipping: no hosts matched ==> rails10-meetup: ==> rails10-meetup: PLAY RECAP ***** ==> rails10-meetup: 127.0.0.1 : ok=1 changed=0

So I checked /etc/ansible/hosts, like this:

[all] 127.0.0.1

Then I changed it to this:

[all] 127.0.0.1 [vm] 127.0.0.1 [mysql] 127.0.0.1 [application] 127.0.0.1

The ansible can go on.

I checked the shell scripts inside shell directory, shell/2-configure-ansible.sh:

!/bin/bash

set -e cat > /tmp/hosts << "EOF" [all] 127.0.0.1 EOF sudo mv -f /tmp/hosts /etc/ansible/hosts

Is there anyone else having the same problem like me?

a-chernykh commented 9 years ago

Thanks for reporting, I am going to fix this soon.