Olá, boa tarde. Estou tendo um problema ao rodar o ansible-playbook
.
Comando executado
ansible-playbook provisioning.yml -u vangrant -i hosts --private-key .vagrant/machines/wordpress/virtualbox/private_key
Mensagem de erro
PLAY [all] *****************************************************************************************************************************************
TASK [Gathering Facts] *****************************************************************************************************************************
fatal: [172.17.177.40]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: ssh: connect to host 172.17.177.40 port 22: No route to host\r\n", "unreachable": true}
[WARNING]: Could not create retry file '/home/allanramos/Documentos/Projetos/Pessoal/Estudos/ansible/aula-2-playbook/provisioning.retry'.
[Errno 13] Permission denied: u'/home/allanramos/Documentos/Projetos/Pessoal/Estudos/ansible/aula-2-playbook/provisioning.retry'
PLAY RECAP *****************************************************************************************************************************************
172.17.177.40 : ok=0 changed=0 unreachable=1 failed=0
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |v|
v.memory = 1024
end
config.vm.provider "wordpress" do |m|
m.vm.network "private_network", ip: "172.17.177.40"
end
end
provisioning.yml
---
- hosts: all
tasks:
- shell: 'echo hello > /vagrant/world.txt'
hosts
[wordpress]
172.17.177.40
Comandos do Vagrant
vagrant staus
Current machine states:
default running (virtualbox)
The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.
vagrant validate
Vagrantfile validated successfully.
Cheguei a rodar chmod -R 775 /home/allanramos/Documentos/Projetos/Pessoal/Estudos/ansible/
mas não surtiu efeito.