Ao tentar executar o vagrant up
o building parece parar na parte do script:
apt-add-repository --yes --update ppa:ansible/ansible && \
Vagrantfile
config.vm.define "ansible" do |ansible|
ansible.vm.network "public_network", ip: "192.168.0.43", bridge: "wlp2s0"
ansible.vm.provision "shell", inline: "apt-get update && apt-get install -y fish"
ansible.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"
ansible.vm.provision "shell",
inline: "cp /vagrant/id_bionic >> /home/vagrant && chmod 600 /home/vagrant/id_bionic"
end
Log do Linux
==> ansible: Running provisioner: shell...
ansible: Running: inline script
ansible: Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease
ansible: Hit:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
ansible: Hit:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
ansible: Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
ansible: Reading package lists...
ansible: Reading package lists...
ansible: Building dependency tree...
ansible:
ansible: Reading state information...
ansible: software-properties-common is already the newest version (0.96.24.32.11).
ansible: software-properties-common set to manually installed.
ansible: 0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
ansible: Error: retrieving gpg key timed out.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
Arquivo de Log completo
Já tentei inclusive executar o comando direto na CLI com sudo
mas não recebo nenhum resultado.
sudo apt-add-repository --yes --update ppa:ansible/ansible
A barra do CLI até pisca as vezes, mas sem resultado.
vagrant@ubuntu-bionic ~> sudo apt-add-repository --yes --update ppa:ansible/ansible
CLI do linux
Após executar o comando sudo apt-get install -y ansible
direto no CLI consigo visualizar a versão do ansible normalmente.
vagrant@ubuntu-bionic ~> sudo apt-get install -y ansible
vagrant@ubuntu-bionic ~> ansible-playbook --version
ansible-playbook 2.5.1
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-playbook
python version = 2.7.15+ (default, Oct 7 2019, 17:39:04) [GCC 7.4.0]
vagrant@ubuntu-bionic ~>
Pergunta
Eu preciso realmente executar a linha apt-add-repository --yes --update ppa:ansible/ansible
para conseguir utilizar o ansible?
O que isso prejudica?
Alias, para que serve essa linha?