mirror of
https://gitlab.com/dbrw/ansible-setup.git
synced 2025-08-04 10:05:40 +07:00
update config
This commit is contained in:
parent
787bb4563f
commit
0b31d606b1
12
roles/common/files/libvirt/jungle.xml
Normal file
12
roles/common/files/libvirt/jungle.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<network>
|
||||||
|
<name>jungle</name>
|
||||||
|
<uuid>da5ae4c3-5a65-43c2-a5b6-91cc4f8d4f1e</uuid>
|
||||||
|
<bridge name='virbr1' stp='on' delay='0'/>
|
||||||
|
<mac address='52:54:00:70:cc:05'/>
|
||||||
|
<domain name='jungle'/>
|
||||||
|
<ip address='192.168.123.1' netmask='255.255.255.0'>
|
||||||
|
<dhcp>
|
||||||
|
<range start='192.168.123.128' end='192.168.123.254'/>
|
||||||
|
</dhcp>
|
||||||
|
</ip>
|
||||||
|
</network>
|
@ -58,6 +58,9 @@
|
|||||||
- include_tasks: keyboard.yml
|
- include_tasks: keyboard.yml
|
||||||
when: install_keyboard == True
|
when: install_keyboard == True
|
||||||
|
|
||||||
|
- include_tasks: virtualization.yml
|
||||||
|
when: install_virtualization == True
|
||||||
|
|
||||||
# Dotfiles
|
# Dotfiles
|
||||||
- include_tasks: dotfiles.yml
|
- include_tasks: dotfiles.yml
|
||||||
when: pull_dotfiles == True
|
when: pull_dotfiles == True
|
||||||
|
37
roles/common/tasks/virtualization.yml
Normal file
37
roles/common/tasks/virtualization.yml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
- name: Install kvm virtualization
|
||||||
|
pacman:
|
||||||
|
name:
|
||||||
|
- virt-manager
|
||||||
|
- qemu-desktop
|
||||||
|
- libvirt
|
||||||
|
- dmidecode
|
||||||
|
- edk2-ovmf
|
||||||
|
- dnsmasq
|
||||||
|
- iptables-nft
|
||||||
|
|
||||||
|
- name: update qemu.conf
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/libvirt/qemu.conf
|
||||||
|
regexp: '{{ item.regexp }}'
|
||||||
|
line: '{{ item.replace }}'
|
||||||
|
with_items:
|
||||||
|
- { regexp: '^#user = ', replace: 'user = "{{ username }}"' }
|
||||||
|
- { regexp: '^#group = ', replace: 'group = "{{ username }}"' }
|
||||||
|
|
||||||
|
- name: Add user {{ username }} to libvirt group
|
||||||
|
ansible.builtin.user:
|
||||||
|
groups: libvirt
|
||||||
|
append: True
|
||||||
|
user: "{{ username }}"
|
||||||
|
|
||||||
|
- name: Define a new network for virtualization
|
||||||
|
community.libvirt.virt_net:
|
||||||
|
command: define
|
||||||
|
name: jungle
|
||||||
|
xml: '{{ lookup("template", "libvirt/jungle.xml") }}'
|
||||||
|
|
||||||
|
- name: Ensure virtualization network active
|
||||||
|
community.libvirt.virt_net:
|
||||||
|
autostart: yes
|
||||||
|
state: active
|
||||||
|
name: jungle
|
13
roles/common/templates/smb.conf.j2
Normal file
13
roles/common/templates/smb.conf.j2
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[global]
|
||||||
|
workgroup = WORKGROUP
|
||||||
|
hosts allow = 192.168.123.0/24
|
||||||
|
|
||||||
|
|
||||||
|
[win7]
|
||||||
|
path = /home/{{ username }}/Public
|
||||||
|
browseable = Yes
|
||||||
|
guest ok = No
|
||||||
|
valid users = {{ username }}
|
||||||
|
read only = No
|
||||||
|
create mask = 0755
|
||||||
|
|
@ -14,8 +14,8 @@ setup_zsh: True
|
|||||||
pull_dotfiles: False
|
pull_dotfiles: False
|
||||||
|
|
||||||
dotfiles:
|
dotfiles:
|
||||||
url: https://github.com/linuxpiper/dotfiles.git
|
url: https://gitlab.com/dbrw/dotfiles.git
|
||||||
destination: projects/dotfiles
|
destination: .dotfiles
|
||||||
rcup_flags: -fx README.md
|
rcup_flags: -fx README.md
|
||||||
|
|
||||||
## Desktop
|
## Desktop
|
||||||
@ -55,6 +55,9 @@ install_doom: True
|
|||||||
## Console-based email client
|
## Console-based email client
|
||||||
install_aerc: True
|
install_aerc: True
|
||||||
|
|
||||||
|
## Do we want to install virt-manager and qemu kvm?
|
||||||
|
install_virtualization: True
|
||||||
|
|
||||||
## AUR vars
|
## AUR vars
|
||||||
## ===========================
|
## ===========================
|
||||||
use_aur: True
|
use_aur: True
|
||||||
|
Loading…
Reference in New Issue
Block a user