Browse Source

linux-gentoo: actualize

master
Maxim Likhachev 3 years ago
parent
commit
940dd96422
  1. 2
      ansible.cfg
  2. 4
      playbook.yml
  3. 14
      roles/linux-gentoo/tasks/main.yml
  4. 4
      roles/linux-gentoo/tasks/xorg.yml
  5. 2
      roles/linux-gentoo/templates/modprobe.d/modules.conf.j2
  6. 21
      roles/linux-gentoo/vars/applications.yml
  7. 5
      roles/linux-gentoo/vars/kernel_modules.yml
  8. 14
      roles/linux-gentoo/vars/mount.yml
  9. 14
      roles/linux-gentoo/vars/portage.yml
  10. 1
      roles/linux-gentoo/vars/services.yml
  11. 2
      roles/linux-gentoo/vars/system.yml
  12. 3
      roles/linux-gentoo/vars/xorg.yml

2
ansible.cfg

@ -8,6 +8,8 @@ forks = 20
; Собирать факты только по требованию ; Собирать факты только по требованию
gathering = explicit gathering = explicit
transport = local
[connection] [connection]
;Подавать команды на Python stdin вместо копирования файлов ;Подавать команды на Python stdin вместо копирования файлов

4
playbook.yml

@ -12,7 +12,7 @@
- role: linux-gentoo - role: linux-gentoo
tags: gentoo tags: gentoo
when: ansible_os_family == "Calculate" when: ansible_os_family == "Gentoo"
- role: macos - role: macos
tags: macos tags: macos
@ -20,7 +20,7 @@
- role: containers - role: containers
tags: containers tags: containers
when: ansible_os_family == "Calculate" when: ansible_os_family == "Gentoo"
- role: shellrc - role: shellrc
when: ansible_os_family == "Darwin" when: ansible_os_family == "Darwin"

14
roles/linux-gentoo/tasks/main.yml

@ -1,4 +1,5 @@
- include_vars: system.yml - include_vars: system.yml
- include_vars: kernel_modules.yml
- include_vars: services.yml - include_vars: services.yml
- include_vars: sysctl.yml - include_vars: sysctl.yml
- include_vars: grub.yml - include_vars: grub.yml
@ -26,11 +27,18 @@
- name: Configure tmpfs - name: Configure tmpfs
mount: mount:
path: "{{ item.path }}" path: "{{ item.path }}"
src: tmpfs src: "{{ item.src }}"
fstype: tmpfs fstype: "{{ item.fstype }}"
state: present state: present
opts: "{{ item.options | default('defaults') }}" opts: "{{ item.options | default('defaults') }}"
with_items: "{{ mount.tmpfs }}" with_items: "{{ mount }}"
- name: Configure kernel modules
vars:
modules: "{{ kernel_modules }}"
template:
src: modprobe.d/modules.conf.j2
dest: /etc/modules-load.d/modules.conf
- include: grub.yml - include: grub.yml

4
roles/linux-gentoo/tasks/xorg.yml

@ -18,8 +18,8 @@
- name: Disable kernel modules - name: Disable kernel modules
vars: vars:
modules: "{{ x.modules.blacklist }}" modules: "{{ x.modules }}"
template: template:
src: modprobe.d/xorg-blacklist.conf.j2 src: modprobe.d/modules.conf.j2
dest: /etc/modprobe.d/xorg-blacklist.conf dest: /etc/modprobe.d/xorg-blacklist.conf

2
roles/linux-gentoo/templates/modprobe.d/xorg-blacklist.conf.j2 → roles/linux-gentoo/templates/modprobe.d/modules.conf.j2

@ -1,6 +1,6 @@
# {{ ansible_managed }} # {{ ansible_managed }}
{% for module in modules %} {% for module in modules %}
blacklist {{ module }} {{ module }}
{% endfor %} {% endfor %}

21
roles/linux-gentoo/vars/applications.yml

@ -35,6 +35,7 @@ apps:
- app-admin/ansible-lint - app-admin/ansible-lint
- app-benchmarks/hyperfine - app-benchmarks/hyperfine
- sys-power/acpi_call - sys-power/acpi_call
- ">=virtual/libcrypt-2"
#- dev-python/resolvelib #- dev-python/resolvelib
# OpenMW # OpenMW
@ -43,15 +44,15 @@ apps:
#- "dev-games/recastnavigation ~amd64" #- "dev-games/recastnavigation ~amd64"
# Containers # Containers
- app-emulation/buildah - app-containers/buildah
- app-emulation/podman - app-containers/podman
- app-emulation/skopeo - app-containers/skopeo
- net-misc/cni-plugins - net-misc/cni-plugins
#- sys-fs/lvm2 #- sys-fs/lvm2
- net-libs/libslirp - net-libs/libslirp
#- sys-block/thin-provisioning-tools #- sys-block/thin-provisioning-tools
- app-emulation/slirp4netns - app-containers/slirp4netns
- app-emulation/conmon - app-containers/conmon
#- dev-libs/libaio #- dev-libs/libaio
- sys-fs/fuse-overlayfs - sys-fs/fuse-overlayfs
- "sys-devel/prelink **" - "sys-devel/prelink **"
@ -73,9 +74,9 @@ apps:
- app-arch/unrar # https://www.rarlab.com/ Extract, view, and test RAR archives. - app-arch/unrar # https://www.rarlab.com/ Extract, view, and test RAR archives.
#- app-benchmarks/hyperfine # https://github.com/sharkdp/hyperfine A command-line benchmarking tool (runs other benchmarks). #- app-benchmarks/hyperfine # https://github.com/sharkdp/hyperfine A command-line benchmarking tool (runs other benchmarks).
- app-editors/neovim # https://neovim.io/ Ambitious Vim-fork focused on extensibility and agility. - app-editors/neovim # https://neovim.io/ Ambitious Vim-fork focused on extensibility and agility.
- app-emulation/buildah # https://github.com/containers/buildah A tool that facilitates building OCI images. - app-containers/buildah # https://github.com/containers/buildah A tool that facilitates building OCI images.
- app-emulation/skopeo # https://github.com/containers/skopeo Command line utility foroperations on container images and image repositories. - app-containers/skopeo # https://github.com/containers/skopeo Command line utility foroperations on container images and image repositories.
- app-emulation/podman # https://github.com/containers/libpod/ Library and podman tool for running OCI-based containers in Pods. - app-containers/podman # https://github.com/containers/libpod/ Library and podman tool for running OCI-based containers in Pods.
#- app-emulation/virtualbox-bin # https://www.virtualbox.org/ Family of powerful x86 virtualization products for enterprise and home use. #- app-emulation/virtualbox-bin # https://www.virtualbox.org/ Family of powerful x86 virtualization products for enterprise and home use.
- app-misc/jq # https://stedolan.github.io/jq/ Lightweight and flexible command-line JSON processor. - app-misc/jq # https://stedolan.github.io/jq/ Lightweight and flexible command-line JSON processor.
- app-misc/nnn # https://github.com/jarun/nnn Tiny, lightning fast, feature-packed file manager. - app-misc/nnn # https://github.com/jarun/nnn Tiny, lightning fast, feature-packed file manager.
@ -117,13 +118,15 @@ apps:
- media-sound/mpd # https://www.musicpd.org/ Flexible, powerful, server-side application for playing music. - media-sound/mpd # https://www.musicpd.org/ Flexible, powerful, server-side application for playing music.
- media-sound/ncmpcpp # https://rybczak.net/ncmpcpp/ NCurses Music Player Client (Plus Plus). - media-sound/ncmpcpp # https://rybczak.net/ncmpcpp/ NCurses Music Player Client (Plus Plus).
- media-video/mpv # https://mpv.io/ Free, open source, and cross-platform media player. - media-video/mpv # https://mpv.io/ Free, open source, and cross-platform media player.
- net-fs/cifs-utils # https://wiki.samba.org/index.php/LinuxCIFS_utils Tools for Managing Linux CIFS Client Filesystems.
- net-fs/sshfs # https://github.com/libfuse/sshfs A network filesystem client to connect to SSH servers. - net-fs/sshfs # https://github.com/libfuse/sshfs A network filesystem client to connect to SSH servers.
- net-libs/nodejs # https://nodejs.org Platform built on V8 to build network applications. - net-libs/nodejs # https://nodejs.org Platform built on V8 to build network applications.
- net-mail/fetchmail # https://www.fetchmail.info Full-featured, robust, well-documented remote-mail retrieval and forwarding utility. - net-mail/fetchmail # https://www.fetchmail.info Full-featured, robust, well-documented remote-mail retrieval and forwarding utility.
- net-misc/aria2 # https://aria2.github.io Lightweight multi-protocol & multi-source command-line download utility. - net-misc/aria2 # https://aria2.github.io Lightweight multi-protocol & multi-source command-line download utility.
- net-misc/connman # https://01.org/connman Internet connection daemon. - net-misc/connman # https://01.org/connman Internet connection daemon.
- net-misc/curl # https://curl.haxx.se/ Get a file from an HTTP, HTTPS or FTP server. - net-misc/curl # https://curl.haxx.se/ Get a file from an HTTP, HTTPS or FTP server.
- net-misc/lagrange # https://gmi.skyjake.fi/lagrange/ https://git.skyjake.fi/gemini/lagrange Desktop GUI client for browsing Geminispace. - net-misc/sshpass # http://sshpass.sourceforge.net Tool for noninteractively performing password authentication with ssh.
# - net-misc/lagrange # https://gmi.skyjake.fi/lagrange/ https://git.skyjake.fi/gemini/lagrange Desktop GUI client for browsing Geminispace.
- net-misc/wget # https://www.gnu.org/software/wget/ Internet file retriever. - net-misc/wget # https://www.gnu.org/software/wget/ Internet file retriever.
- sys-apps/coreutils # https://www.gnu.org/software/coreutils GNU File, Shell, and Text utilities. - sys-apps/coreutils # https://www.gnu.org/software/coreutils GNU File, Shell, and Text utilities.
#- sys-cluster/k9scli # https://k9scli.io terminal based UI to manage kubernetes clusters. #- sys-cluster/k9scli # https://k9scli.io terminal based UI to manage kubernetes clusters.

5
roles/linux-gentoo/vars/kernel_modules.yml

@ -0,0 +1,5 @@
---
kernel_modules:
- fuse

14
roles/linux-gentoo/vars/mount.yml

@ -1,12 +1,24 @@
mount: mount:
tmpfs:
- path: /tmp - path: /tmp
src: tmpfs
fstype: tmpfs
- path: /var/lock - path: /var/lock
src: tmpfs
fstype: tmpfs
- path: /var/tmp - path: /var/tmp
src: tmpfs
fstype: tmpfs
options: rw,nosuid,noatime,nodev,size=5G,mode=1777 options: rw,nosuid,noatime,nodev,size=5G,mode=1777
- path: /var/calculate/tmp/portage - path: /var/calculate/tmp/portage
src: tmpfs
fstype: tmpfs
options: rw,nosuid,noatime,nodev,size=8G,mode=775,uid=portage,gid=portage options: rw,nosuid,noatime,nodev,size=8G,mode=775,uid=portage,gid=portage
- path: /mnt/KEENETIC
src: //192.168.1.1/HDD2TB
fstype: cifs
options: nofail,guest,rw,iocharset=utf8,uid=1000
# - path: /var/tmp/portage # - path: /var/tmp/portage
# fstype: tmpfs
# options: rw,nosuid,noatime,nodev,size=5G,mode=775,uid=portage,gid=portage,x-mount.mkdir=775 # options: rw,nosuid,noatime,nodev,size=5G,mode=775,uid=portage,gid=portage,x-mount.mkdir=775

14
roles/linux-gentoo/vars/portage.yml

@ -132,7 +132,7 @@ gentoo:
- app-arch/lbzip2 symlink - app-arch/lbzip2 symlink
- app-arch/pigz symlink - app-arch/pigz symlink
- app-editors/neovim -nvimpager luajit tui lua_single_target_luajit - app-editors/neovim -nvimpager luajit tui lua_single_target_luajit
- app-emulation/podman fuse rootless - app-containers/podman fuse rootless
- app-misc/recoll -spell -inotify - app-misc/recoll -spell -inotify
- app-misc/vifm X extended-keys magic - app-misc/vifm X extended-keys magic
- app-portage/eix sqlite - app-portage/eix sqlite
@ -169,8 +169,8 @@ gentoo:
- media-gfx/graphviz -gtk tcl # Tcl/Tk Img package - media-gfx/graphviz -gtk tcl # Tcl/Tk Img package
- media-gfx/imagemagick X - media-gfx/imagemagick X
- media-gfx/sxiv exif gif - media-gfx/sxiv exif gif
- media-libs/freetype X cleartype_hinting adobe-cff harfbuzz - media-libs/freetype X cleartype_hinting adobe-cff -harfbuzz
- media-libs/harfbuzz glib - media-libs/harfbuzz X glib
- media-libs/imlib2 X gif - media-libs/imlib2 X gif
- media-libs/leptonica tiff - media-libs/leptonica tiff
- media-libs/libass fontconfig - media-libs/libass fontconfig
@ -204,7 +204,7 @@ gentoo:
- sys-apps/net-tools hostname - sys-apps/net-tools hostname
- sys-apps/openrc netifrc - sys-apps/openrc netifrc
- sys-apps/pciutils kmod - sys-apps/pciutils kmod
- sys-apps/portage native-extensions -python_targets_python3_8 - sys-apps/portage native-extensions -python_targets_python3_10
- sys-apps/shadow su -cracklib - sys-apps/shadow su -cracklib
- sys-apps/texinfo standalone - sys-apps/texinfo standalone
- sys-apps/util-linux logger - sys-apps/util-linux logger
@ -212,7 +212,8 @@ gentoo:
- sys-devel/binutils gold - sys-devel/binutils gold
- sys-devel/gcc graphite pch ssp pgo -multilib - sys-devel/gcc graphite pch ssp pgo -multilib
- sys-fs/cryptsetup openssl - sys-fs/cryptsetup openssl
- sys-fs/eudev hwdb kmod - sys-fs/ntfs3g fuse
- sys-fs/udev kmod
- sys-kernel/calculate-sources grub desktop symlink vmlinuz -minimal - sys-kernel/calculate-sources grub desktop symlink vmlinuz -minimal
- sys-kernel/linux-firmware redistributable - sys-kernel/linux-firmware redistributable
- sys-libs/glibc multiarch nscd ssp -multilib - sys-libs/glibc multiarch nscd ssp -multilib
@ -222,7 +223,7 @@ gentoo:
- x11-base/xorg-server -minimal xorg suid - x11-base/xorg-server -minimal xorg suid
- x11-drivers/xf86-video-intel dri sna uddev uxa xvmc # Default USE flags. - x11-drivers/xf86-video-intel dri sna uddev uxa xvmc # Default USE flags.
- x11-drivers/nvidia-drivers X driver tools - x11-drivers/nvidia-drivers X driver tools
- x11-libs/cairo X svg # Required by gtk+ - x11-libs/cairo X svg glib # Required by gtk+
- x11-libs/gtk+ X - x11-libs/gtk+ X
- x11-libs/libxcb X xkb - x11-libs/libxcb X xkb
- x11-libs/pango X - x11-libs/pango X
@ -231,6 +232,7 @@ gentoo:
- x11-misc/xmobar -alsa -dbus #mpd - x11-misc/xmobar -alsa -dbus #mpd
- x11-terms/st savedconfig - x11-terms/st savedconfig
- x11-wm/xmonad -default-term - x11-wm/xmonad -default-term
- ">=virtual/libcrypt-2 -static-libs"
enabled: enabled:
# - lto # Build with link time optimization (LTO). # - lto # Build with link time optimization (LTO).

1
roles/linux-gentoo/vars/services.yml

@ -5,7 +5,6 @@ services:
- name: cupsd - name: cupsd
- name: bluetooth - name: bluetooth
- name: sshd - name: sshd
- name: netmount
- name: swap - name: swap
runlevel: boot runlevel: boot
enabled: enabled:

2
roles/linux-gentoo/vars/system.yml

@ -1,6 +1,6 @@
system: system:
hostname: calculate hostname: carbon
tty_consoles: 4 tty_consoles: 4
console_font: cyr-sun16 console_font: cyr-sun16
display_brightness: 30 display_brightness: 30

3
roles/linux-gentoo/vars/xorg.yml

@ -1,8 +1,7 @@
x: x:
driver: nvidia driver: nvidia
modules: modules:
blacklist: - blacklist nouveau
- nouveau
font_name: NotoMono Nerd Font font_name: NotoMono Nerd Font
xkb: xkb:
directory: /usr/share/X11/xkb/symbols directory: /usr/share/X11/xkb/symbols

Loading…
Cancel
Save