crivetimihai / ansible_virtualization

Ansible Collection: Virtualization roles
https://crivetimihai.github.io/ansible_virtualization/
40 stars 33 forks source link

Unable to install vagrant on Ubuntu 18.04 #1

Closed ericp1337 closed 5 years ago

ericp1337 commented 5 years ago

When running this role I am getting the following error:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "No package matching 'https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.deb' is available"}

This is happening because in the install_Ubuntu.yml task it is calling the package module using the name parameter but passing a list of urls to a deb. The only way to install a deb from a url according to ansible docs is by using the deb parameter.

Here is one way of fixing the error:

- name: install Ubuntu packages
  package:
    deb: "{{ item }}"
  loop: "{{ ubuntu_packages }}"
  become: yes

I'm sure there is probably a better way to address this issue rather than using the snippet above.

crivetimihai commented 5 years ago

Thanks, fixed with apt module.