Skip to content

Instantly share code, notes, and snippets.

@markgraf
Created July 29, 2020 09:07
Show Gist options
  • Select an option

  • Save markgraf/8d5be7d32cb6dcaa86d3fa63c74a2f69 to your computer and use it in GitHub Desktop.

Select an option

Save markgraf/8d5be7d32cb6dcaa86d3fa63c74a2f69 to your computer and use it in GitHub Desktop.

Revisions

  1. markgraf created this gist Jul 29, 2020.
    18 changes: 18 additions & 0 deletions installing_vagrant.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    Unfortunately there is no repo for vagrant-packages to install .deb-packages from
    (see [an ages old issue](https://github.com/hashicorp/vagrant-installers/issues/12)),
    so here's an ugly hack to install the latest version of vagrant through Ansible.

    ```lang=yaml
    - name: Find latest vagrant-version
    shell: wget -qO - https://releases.hashicorp.com/vagrant/ | grep -o 'vagrant_[[:digit:]]\.[[:digit:]]\.[[:digit:]]' | sed 's/vagrant_//'| head -1
    register: vagrant_version.
    - name: Install vagrant
    apt:
    deb: "https://releases.hashicorp.com/vagrant/{{ vagrant_version }}/vagrant_{{ vagrant_version }}_x86_64.deb"
    when: ansible_os_family | lower == 'debian'
    become: yes
    ```
    An alternative would be to use ubuntu-ppa on Debian. Hm. Not so sure about that.

    Hopefully they'll integrate vagrant into their [freshly announced linux-repos](https://www.hashicorp.com/blog/announcing-the-hashicorp-linux-repository/) some time soon...