add asrock04 and fine tune user-data

This commit is contained in:
Arif Ali 2023-03-05 11:04:48 +00:00
parent d2074bf788
commit ac7d9ca361
Signed by: arif
GPG Key ID: 369608FBA1353A70
2 changed files with 22 additions and 6 deletions

15
configs/asrock04.config Normal file
View File

@ -0,0 +1,15 @@
hypervisor_name=asrock04
hypervisor_ip=10.0.1.244
hypervisor_mac="a8:a1:59:e4:92:b8"
hypervisor_tag="asrock"
ip_suffix=244
external_ip=192.168.1.214
compute="as4-maas-node"
# Disks that exist on the server
disk_name=()
disk_names+=(sda)
disk_names+=(nvme0n1)

View File

@ -66,17 +66,18 @@ write_files:
ln -s /usr/bin/virsh /home/virsh/bin/virsh
sh -c echo "PATH=/home/virsh/bin" >> /home/virsh/.bashrc
cat >> /etc/ssh/sshd_config << EOF
systemctl restart sshd
usermod -a -G libvirt,libvirt-qemu virsh
permissions: '0755'
owner: root:root
- path: /etc/ssh/sshd_config.d/90-virsh-user.conf
content: |
Match user virsh
X11Forwarding no
AllowTcpForwarding no
PermitTTY no
ForceCommand nc -q 0 -U /var/run/libvirt/libvirt-sock
EOF
systemctl restart sshd
usermod -a -G libvirt,libvirt-qemu virsh
permissions: '0755'
owner: root:root
- path: /root/wipe_disk.sh
content: |