Vagrant: Unterschied zwischen den Versionen

Aus Info-Theke
Zur Navigation springen Zur Suche springen
Zeile 1: Zeile 1:
= Links =
= Links =
* https://app.vagrantup.com/bento/boxes/debian-11
* https://app.vagrantup.com/bento/boxes/debian-11
= Beispiel =
* Vagrantfile
* HostOnly-Netzwerk 192.168.150.0/24 ist eingerichtet
<pre>
NETWORK_PREFIX = "192.168.150"
Vagrant.configure("2") do |config|
  config.vm.define "ansible" do |ansible|
    ansible.vm.box = "bento/debian-11"
    ansible.vm.hostname = "ansible"
    ansible.vm.network :private_network, ip: "#{NETWORK_PREFIX}.100"
  end
end
</pre>
<syntaxhighlight lang="bash">
sudo vagrant up
</syntaxhighlight>


= Installation =
= Installation =

Version vom 30. Oktober 2022, 20:03 Uhr

Links

Beispiel

  • Vagrantfile
  • HostOnly-Netzwerk 192.168.150.0/24 ist eingerichtet
NETWORK_PREFIX = "192.168.150"
Vagrant.configure("2") do |config|
  config.vm.define "ansible" do |ansible|
    ansible.vm.box = "bento/debian-11"
    ansible.vm.hostname = "ansible"
    ansible.vm.network :private_network, ip: "#{NETWORK_PREFIX}.100"
  end
end
sudo vagrant up

Installation

  • Virtualbox muss installiert sein, 6.1 ist OK, 7.0 (noch) nicht
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
apt update && sudo apt install vagrant
echo "* 0.0.0.0/0 ::/0" >/etc/vbox/networks.conf