Boa noite. Após subir vm via vagrant utilizando vagrantfile. Ao executar o primeiro comando no ansible da seguinte mensagem:
"vagrant@vagrant-ubuntu-trusty-64:~$ ansible wordpress -i hosts -u vagrant --private-key ssh-keys/vagrant_id_rsa -m ping -m shell -a 'echo Hello, World' [WARNING]: Unable to parse /home/vagrant/hosts as an inventory source [WARNING]: No inventory was parsed, only implicit localhost is available [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: wordpress"
Estou usando Windows
Segue abaixo os arquivos:
(Maquina subiu ok) Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |v| v.memory = 1024 end
config.vm.define "wordpress" do |m| m.vm.network "private_network", ip: "172.17.177.40" end
end
arquivo hosts. [wordpress] 172.17.177.40
Versão do Ansible:
vagrant@vagrant-ubuntu-trusty-64:$ ansible --version
ansible 2.9.21
config file = /etc/ansible/ansible.cfg
configured module search path = [u'/home/vagrant/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.6 (default, Nov 13 2018, 12:45:42) [GCC 4.8.4]
vagrant@vagrant-ubuntu-trusty-64:$
Versão do Python! vagrant@vagrant-ubuntu-trusty-64:~$ python -V Python 2.7.6