Bom dia, estou com problema para subir a maquina, no meu caso tenho windows, logo criei uma maquina no vagrant ansible para simular as aulas nela, tentei efetuar os passou para o erro descrito, mas apareceu o seguinte erro:
vagrant@ubuntu-bionic:/vagrant$ ssh-copy-id -i configs/ssh-keys.pub vagrant@172.17.177.40 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "configs/ssh-keys.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: ERROR: ssh: connect to host 172.17.177.40 port 22: No route to host
meu vagrantfile está assim:
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |v|
v.memory = 512
end
config.vm.define "wordpress" do |wordpress|
wordpress.vm.network "private_network", ip: "172.17.177.40"
wordpress.vm.provision "shell",
inline: "cat /vagrant/configs/id_bionic.pub >> .ssh/authorized_keys"
wordpress.vm.provision "shell",
inline: "cp /vagrant/id_bionic /home/vagrant/id_bionic && \
chmod 600 /home/vagrant/id_bionic && \
chown vagrant:vagrant /home/vagrant/id_bionic"
end
config.vm.define "ansi" do |ansi|
ansi.vm.box = "ubuntu/bionic64"
ansi.vm.provider "virtualbox" do |vb|
vb.memory = 512
vb.cpus = 1
vb.name = "bionic_ansi"
end
ansi.vm.network "public_network", ip: "172.17.177.41"
ansi.vm.provision "shell",
inline: "apt-get update && \
apt-get install -y software-properties-common && \
apt-add-repository --yes --update ppa:ansible/ansible && \
apt-get install -y ansible"
ansi.vm.provision "shell",
inline: "cat /vagrant/configs/id_bionic.pub >> .ssh/authorized_keys"
ansi.vm.provision "shell",
inline: "cp /vagrant/id_bionic /home/vagrant/id_bionic && \
chmod 600 /home/vagrant/id_bionic && \
chown vagrant:vagrant /home/vagrant/id_bionic"
end
end