add roles/toxcore

This commit is contained in:
2024-01-08 12:51:06 +00:00
parent c8610f9ded
commit 7e491f4b8c
51 changed files with 1665 additions and 770 deletions

View File

@@ -25,6 +25,30 @@
# see /etc/libvirt/qemu.conf
- "{{ '/etc/pki/qemu' if ( 'qemu' in TOXCORE_FEATURES or 'libvirt' in TOXCORE_FEATURES ) else '' }}"
- name: "make a directory 775"
file:
path: "{{item }}"
state: directory
owner: "{{BOX_ROOT_USER}}"
group: "{{BOX_ROOT_GROUP}}"
mode: 0775
when:
- "item != ''"
with_items:
- /etc/sysctl.conf.d
- name: "make a directory 1777"
file:
path: "{{item }}"
state: directory
owner: "{{BOX_ROOT_USER}}"
group: "{{BOX_ROOT_GROUP}}"
mode: 01777
when:
- "item != ''"
with_items:
- /run/tmp
- block:
- name: increase fs.inotify.max_user_instances (default 128)
@@ -38,11 +62,6 @@
net.ipv4.ip_forward = 1
# NB this is per user
- name: check ulimit
shell: |
[ `ulimit -n` -lt 4913709 ]
register: ulimit_retval
# Kernel ulimit is less than the expected value! This might induce RC test
- name: /etc/security/limits.conf
blockinfile:
@@ -72,7 +91,7 @@
# need this in libvirt guest.
when:
# do this anyway for tor and everybody else
- true or ulimit_retval.rc|default(1) == 0
- true
when:
- true or ansible_connection|default('') not in PLAY_CHROOT_CONNECTIONS
@@ -101,16 +120,18 @@
check_mode: false
- name: /etc/sysctl.conf.d/20_hugepages.conf
check_mode: false
lineinfile:
dest: /etc/sysctl.conf.d/20_hugepages.conf
regexp: '^#* *{{item.key}}.*'
line: "{{item.key}} = {{item.val}}"
state: present
create: yes
with_items:
# https://wiki.archlinux.org/title/KVM#Enabling_huge_pages
# boot cmdline hugepages=
- { key: "vm.nr_hugepages", val: "550" }
check_mode: false
ignore_errors: true
when:
- ansible_virtualization_role|replace('NA', 'host') == 'host' or
@@ -119,7 +140,7 @@
rescue:
- debug:
verbosity: 1
msg: "Ignoring error"
msg: "INFO: RESCUE vms Ignoring error"
#libvirt
- block: