- 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
vagrant ssh ansible
vagrant global-status
vagrant box { list | update }
vagrant { up | halt reload | destroy } [<name>]
vagrant snapshot list
vagrant snapshot { push | pop } [<name>]
- Virtualbox muss installiert sein, 6.1 ist OK, 7.0 (noch) nicht
- Nur Hostsystem benötigt Ansible, Clients nur Python und SSH
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