base_role/tasks/lati.yml
embed@git.macaw.me b50fd16591 first
2024-01-06 01:38:28 +00:00

172 lines
7.1 KiB
YAML

# -*- mode: yaml; indent-tabs-mode: nil; tab-width: 2; coding: utf-8-unix -*-
---
- name: "DEBUG: base lati.yml {{ansible_distribution}}"
debug:
verbosity: 1
msg: "DEBUG: Including base lati.yml {{ansible_distribution}}"
- block:
- name: "/etc/portage/make.conf base lati CPU_FLAGS_X86"
blockinfile:
dest: /etc/portage/make.conf
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base lati.yml CPU_FLAGS_X86"
block: |
# The following REQUIRED_USE flag constraints are unsatisfied: ffmpeg
# cpu_flags_x86_sse? ( cpu_flags_x86_mmxext )
#CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
# 2021-01 The following REQUIRED_USE flag constraints are unsatisfied: opengl
# cpu_flags_x86_avx2? ( cpu_flags_x86_f16c )
#hwinfo - fpu,vme,de,pse,tsc,msr,pae,mce,cx8,apic,sep,mtrr,pge,mca,cmov,pat,pse36,clflush,dts,acpi,mmx,fxsr,sse,sse2,ss,ht,tm,pbe,syscall,nx,rdtscp,lm,constant_tsc,arch_perfmon,pebs,bts,rep_good,nopl,xtopology,tsc_reliable,nonstop_tsc,cpuid,aperfmperf,tsc_known_freq,pni,pclmulqdq,dtes64,monitor,ds_cpl,vmx,est,tm2,ssse3,cx16,xtpr,pdcm,sse4_1,sse4_2,movbe,popcnt,tsc_deadline_timer,aes,rdrand,lahf_lm,3dnowprefetch,epb,pti,ibrs,ibpb,stibp,tpr_shadow,vnmi,flexpriority,ept,vpid,tsc_adjust,smep,erms,dtherm,ida,arat,md_clear
CPU_FLAGS_X86="fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 movbe popcnt tsc_deadline_timer aes rdrand lahf_lm 3dnowprefetch epb pti ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid tsc_adjust smep erms dtherm ida arat md_clear"
# the above squawks with cpu_flags_x86_avx2? ( cpu_flags_x86_f16c )
#CPU_FLAGS_X86="avx fma3 popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" # -avx512f -f16c
- name: "/etc/portage/make.conf base lati INPUT_DEVICES"
blockinfile:
dest: /etc/portage/make.conf
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base lati INPUT_DEVICES"
block: |
# NO -libinput replaces evdev, synaptics AND tslib; gentoo defaults keyboad and mouse have been deprecated for years, so drop them
# NO - INPUT_DEVICES="libinput"
# crucial - not udev
# INPUT_DEVICES="evdev input keyboard synaptics"
# 2020-04 If however neither libinput or evdev is in use, one should append
# 'libinput' to the INPUT_DEVICES variable inside /etc/portage/make.conf
# while removing 'keyboard' and 'mouse' if present, then update @world
INPUT_DEVICES="evdev libinput synaptics"
# (II) Using input driver 'libinput' anyway
- name: "/etc/portage/make.conf base lati VIDEO_CARDS"
blockinfile:
dest: /etc/portage/make.conf
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base lati VIDEO_CARDS"
block: |
# 2018-12 added i915 - but is that wrong?
# https://forums.gentoo.org/viewtopic-t-914530-start-0.html
# put i965 even on a 1915 machine - for portability and some qt apps load it or complain - e.g. aqemu.
# lxd Funtoo i965
# not sure if kernel modules from the iso is a prereq/dup of X drivers?
# lati is a real 8gen - no intel or i915 and use modesetting
# no nouveau for now
VIDEO_CARDS="vesa vga fbdev qxl intel i965 nvidia virtualbox"
# 2020-02 - this is showing up: amdgpu dummy fbdev glint i965 intel mga nouveau nv nvidia radeon radeonsi siliconmotion vesa via vmware
#you can check available options with "emerge -vp xorg-drivers"
- name: "/etc/portage/make.conf base lati ABI_X86"
blockinfile:
dest: /etc/portage/make.conf
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base lati ABI_X86"
block: |
# 2015-06 - this is causing havoc
# ABI_X86="64 32"
# 2020-02 - not in pentoo profile - was back in and glibc ended up with
# Feb 18 23:30 /lib/ld-linux.so.2 -> ../lib32/ld-linux.so.2
- name: "/etc/portage/make.conf base lati MAKEOPTS"
blockinfile:
dest: /etc/portage/make.conf
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base lati MAKEOPTS"
block: |
# With MAKEOPTS you define how many parallel compilations should occur
MAKEOPTS="-j2"
- name: "/etc/portage/package.use/2013-07_32video-intel.txt"
blockinfile:
dest: /etc/portage/package.use/2013-07_32video-intel.txt
marker: "# {mark} ANSIBLE MANAGED BLOCK base lati"
create: true
block: |
# required by x11-drivers/xf86-video-intel-2.21.11
# required by xf86-video-intel (argument) video_cards_intel?
# 2020-02 removed video_cards_intel
x11-libs/libdrm libkms
- name: "/etc//make.conf base lati ACCEPT_LICENSE"
blockinfile:
dest: /etc/portage/make.conf
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base lati ACCEPT_LICENSE"
block: |
ACCEPT_LICENSE="* -@EULA intel-ucode-20180807 FraunhoferFDK"
- name: /etc/modprobe.d/synaptics_exps.conf
blockinfile:
dest: /etc/modprobe.d/synaptics_exps.conf
marker: "# {mark} ANSIBLE MANAGED BLOCK lati"
mode: 0644
owner: "{{BASE_ROOT_USER}}"
group: "{{BOX_ROOT_GROUP}}"
create: true
block: |
options psmouse proto=exps
when:
- ansible_distribution == 'Gentoo'
- HOSTNAME_HARDWARE|default('') == 'lati'
- block:
- name: "/etc/portage/make.conf base lati MAKEOPTS"
blockinfile:
dest: /etc/portage/make.conf
create: false
marker: "# {mark} ANSIBLE MANAGED BLOCK base lati MAKEOPTS"
block: |
# With MAKEOPTS you define how many parallel compilations should occur
MAKEOPTS="-j4"
when:
- ansible_distribution == 'Gentoo'
- HOSTNAME_HARDWARE|default('') == 'rog'
#sh spectre-meltdown-checker.sh --kernel /boot/kernel-genkernel-x86_64-5.2.20 --config /usr/src/linux/.config --map /boot/System.map-genkernel-x86_64-5.2.20
#?c /etc/udev/rules.d/70-persistent-net.rules
# FixMe: modules.conf?
- name: /etc/modprobe.d/kvm.conf
blockinfile:
dest: /etc/modprobe.d/kvm.conf
marker: "# {mark} ANSIBLE MANAGED BLOCK lati"
mode: 0644
owner: "{{BASE_ROOT_USER}}"
group: "{{BOX_ROOT_GROUP}}"
create: true
block: |
options kvm-intel nested=1
options kvm-amd nested=1
- name: "/etc/modules-load.d/psmouse.conf"
blockinfile:
dest: /etc/modules-load.d/psmouse.conf
create: true
marker: "# {mark} ANSIBLE MANAGED BLOCK lati"
block: |
# psmouse is necessary for X and sufficient for gpm
psmouse
- name: /etc/modprobe.d/loop.conf
blockinfile:
dest: /etc/modprobe.d/loop.conf
marker: "# {mark} ANSIBLE MANAGED BLOCK lati"
mode: 0644
owner: "{{BASE_ROOT_USER}}"
group: "{{BOX_ROOT_GROUP}}"
create: true
block: |
# https://wiki.archlinux.org/index.php/QEMU#Change_Existing_Windows_VM_to_use_virtio
options loop max_part=15