Added a basic template for the debian11 VM.
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
* debian11-template
|
||||
It's a simple configuration for debian11 using Vagrant and Ansible.
|
||||
|
||||
* Using
|
||||
⚠ W️ARNING ⚠️
|
||||
Setup virt-manager, QEMU and libvirt for using configuration.
|
||||
|
||||
I'm using nix-shell for running vagrant and ansible.
|
||||
You can just install them to your host or install nix for using nix-shell.
|
||||
|
||||
Open a shell in the repository folder.
|
||||
Run to open the VM:
|
||||
#+BEGIN_SRC shell
|
||||
nix-shell
|
||||
vagrant up
|
||||
vagrant ssh
|
||||
#+END_SRC
|
||||
|
||||
To close:
|
||||
#+BEGIN_SRC shell
|
||||
logout
|
||||
vagrant halt
|
||||
#+END_SRC
|
||||
|
||||
To remove VM:
|
||||
#+BEGIN_SRC shell
|
||||
vagrant destroy
|
||||
#+END_SRC
|
||||
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.driver = "kvm"
|
||||
end
|
||||
|
||||
config.vm.define "main" do |subconfig|
|
||||
subconfig.vm.box = "generic/debian11"
|
||||
subconfig.vm.hostname = "debian11-ansible-vm"
|
||||
|
||||
subconfig.vm.provider :libvirt do |domain|
|
||||
domain.memory = 4096
|
||||
domain.cpus = 1
|
||||
end
|
||||
|
||||
subconfig.vm.provision "ansible" do |ansible|
|
||||
ansible.verbose = "v"
|
||||
ansible.playbook = "main_playbook.yaml"
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- hosts: all
|
||||
become: yes
|
||||
tasks:
|
||||
- name: Update apt cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
||||
- name: Upgrade all packages
|
||||
apt:
|
||||
upgrade: dist
|
||||
autoremove: yes
|
||||
autoclean: yes
|
||||
- name: install neofetch
|
||||
apt:
|
||||
name:
|
||||
- neofetch
|
||||
- name: install docker
|
||||
apt:
|
||||
name:
|
||||
- docker
|
||||
- docker-compose
|
||||
Reference in New Issue
Block a user