From c613df274a3d9642323cc9527d9d4fbe8b6fab3b Mon Sep 17 00:00:00 2001 From: DarkFeather Date: Wed, 29 Apr 2026 12:07:37 -0500 Subject: [PATCH] Adding Node4 --- bin/generate-systemd-vms.py | 6 +++--- examples/msn0.yml | 19 ++++++++++++++----- roles/Chappaai/tasks/main.yml | 2 +- roles/ShadowArch/files/motd/Node4 | 6 ++++++ roles/ShadowArch/tasks/repositories.yml | 10 +++++++--- roles/Sharingan/files/monit/hostdefs/Node4 | 2 ++ 6 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 roles/ShadowArch/files/motd/Node4 create mode 100644 roles/Sharingan/files/monit/hostdefs/Node4 diff --git a/bin/generate-systemd-vms.py b/bin/generate-systemd-vms.py index 749517e..4819602 100755 --- a/bin/generate-systemd-vms.py +++ b/bin/generate-systemd-vms.py @@ -49,12 +49,12 @@ def WriteVMFile(content,hosttype,hostclass): with open(filepath+host+'-vm.service','w') as vmfile: vmfile.write('[Unit]\n') vmfile.write('Description=AniNIX/' + host + '\n') - vmfile.write('After=network.target\n') + vmfile.write('After=network-online.target\n') vmfile.write('\n') vmfile.write('[Service]\n') - vmfile.write('ExecStart=/usr/sbin/qemu-system-x86_64 -name AniNIX/' + host + ' -machine type=pc,accel=kvm') + vmfile.write('ExecStart=/usr/sbin/qemu-system-x86_64 -name AniNIX/' + host + ' -machine type=q35,accel=kvm') if 'uefi' in content['all']['children'][hosttype]['children'][hostclass]['hosts'][host].keys(): vmfile.write(' -bios /usr/share/edk2-ovmf/x64/OVMF.fd') - vmfile.write(' -cpu host -smp ' + cores + ' ' + disks + ' -net nic,macaddr=' + mac + ',model=virtio -net bridge,br=' + bridge + ' -vga std -nographic -vnc :' + str(vnc) + ' -m size=' + str(memory) + 'G -device virtio-rng-pci\n') + vmfile.write(' -cpu host -smp ' + cores + ' ' + disks + ' -net nic,macaddr=' + mac + ',model=virtio -net bridge,br=' + bridge + ' -vga std -nographic -serial none -vnc :' + str(vnc) + ' -m size=' + str(memory) + 'G -device virtio-rng-pci\n') vmfile.write('ExecReload=/bin/kill -HUP $MAINPID\n') vmfile.write('KillMode=process\n') vmfile.write('Restart=always\n') diff --git a/examples/msn0.yml b/examples/msn0.yml index 8cc8e8f..7fcebb6 100644 --- a/examples/msn0.yml +++ b/examples/msn0.yml @@ -64,7 +64,7 @@ all: ip: 10.0.1.5 mac: fa:ec:43:87:4d:2d tap: true - ups: 'aps' + ups: 'apc' active_vms: - Yggdrasil Node2: @@ -84,6 +84,15 @@ all: tap: true active_vms: - TDS-Jump + Node4: + ansible_user: depriv + ipinterface: enp1s0 + ip: 10.0.1.6 + mac: c8:ff:bf:0c:71:94 + tap: true + ups: 'apc' + active_vms: + - Yggdrasil Geth: hosts: Geth0: @@ -171,10 +180,10 @@ all: vnc: 1 vscan_enabled: true disks: - - '-drive format=raw,index=0,media=disk,file=/dev/sda' - - '-drive format=raw,index=0,media=disk,file=/dev/sdb' - - '-drive format=raw,index=0,media=disk,file=/dev/sdc' - - '-drive format=raw,index=0,media=disk,file=/dev/sdd' + - '-device virtio-scsi-pci,id=scsi0 -drive file=/dev/sda,if=none,format=raw,discard=unmap,aio=native,cache=none,id=sda -device scsi-hd,drive=sda,bus=scsi0.0' + - '-device virtio-scsi-pci,id=scsi1 -drive file=/dev/sdb,if=none,format=raw,discard=unmap,aio=native,cache=none,id=sdb -device scsi-hd,drive=sdb,bus=scsi1.0' + - '-device virtio-scsi-pci,id=scsi2 -drive file=/dev/sdc,if=none,format=raw,discard=unmap,aio=native,cache=none,id=sdc -device scsi-hd,drive=sdc,bus=scsi2.0' + - '-device virtio-scsi-pci,id=scsi3 -drive file=/dev/sdd,if=none,format=raw,discard=unmap,aio=native,cache=none,id=sdd -device scsi-hd,drive=sdd,bus=scsi3.0' Vergil: # 10.0.1.32/28 vars: motion_enabled: yes diff --git a/roles/Chappaai/tasks/main.yml b/roles/Chappaai/tasks/main.yml index 81bf770..ae9be5c 100644 --- a/roles/Chappaai/tasks/main.yml +++ b/roles/Chappaai/tasks/main.yml @@ -29,7 +29,7 @@ become: yes register: dns_updated copy: - dest: /etc/pihole/custom.list + dest: /etc/pihole/hosts/custom.list src: dns owner: pihole group: pihole diff --git a/roles/ShadowArch/files/motd/Node4 b/roles/ShadowArch/files/motd/Node4 new file mode 100644 index 0000000..62781e4 --- /dev/null +++ b/roles/ShadowArch/files/motd/Node4 @@ -0,0 +1,6 @@ +################################################################################ +# AniNIX/Node4 # +# # +# This is the network virtualization platform. VMs can be found with this: # +# cd /usr/lib/systemd/system; ls -1 *vm.service | xargs -n 1 systemctl status # +################################################################################ diff --git a/roles/ShadowArch/tasks/repositories.yml b/roles/ShadowArch/tasks/repositories.yml index 4acbeec..86ab509 100644 --- a/roles/ShadowArch/tasks/repositories.yml +++ b/roles/ShadowArch/tasks/repositories.yml @@ -57,11 +57,15 @@ - git - tmux - vim - - sysstat - - iotop - - lsof - rsync - xfsprogs - man + - sysstat + - iotop + - lsof + - bind + - net-tools + - curl + - nmap state: present update_cache: yes diff --git a/roles/Sharingan/files/monit/hostdefs/Node4 b/roles/Sharingan/files/monit/hostdefs/Node4 new file mode 100644 index 0000000..5f05c91 --- /dev/null +++ b/roles/Sharingan/files/monit/hostdefs/Node4 @@ -0,0 +1,2 @@ +include "/etc/monit.d/checks/system" +include "/etc/monit.d/checks/automated_response"