diff --git a/ansible.cfg b/ansible.cfg index 437b942..a00882e 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -8,6 +8,8 @@ forks = 20 ; Собирать факты только по требованию gathering = explicit +transport = local + [connection] ;Подавать команды на Python stdin вместо копирования файлов diff --git a/playbook.yml b/playbook.yml index 16f1e10..a769d05 100644 --- a/playbook.yml +++ b/playbook.yml @@ -12,7 +12,7 @@ - role: linux-gentoo tags: gentoo - when: ansible_os_family == "Calculate" + when: ansible_os_family == "Gentoo" - role: macos tags: macos @@ -20,7 +20,7 @@ - role: containers tags: containers - when: ansible_os_family == "Calculate" + when: ansible_os_family == "Gentoo" - role: shellrc when: ansible_os_family == "Darwin" diff --git a/roles/linux-gentoo/tasks/main.yml b/roles/linux-gentoo/tasks/main.yml index 5764032..cfdd14b 100644 --- a/roles/linux-gentoo/tasks/main.yml +++ b/roles/linux-gentoo/tasks/main.yml @@ -1,4 +1,5 @@ - include_vars: system.yml +- include_vars: kernel_modules.yml - include_vars: services.yml - include_vars: sysctl.yml - include_vars: grub.yml @@ -26,11 +27,18 @@ - name: Configure tmpfs mount: path: "{{ item.path }}" - src: tmpfs - fstype: tmpfs + src: "{{ item.src }}" + fstype: "{{ item.fstype }}" state: present 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 diff --git a/roles/linux-gentoo/tasks/xorg.yml b/roles/linux-gentoo/tasks/xorg.yml index 31683b0..9d5dafc 100644 --- a/roles/linux-gentoo/tasks/xorg.yml +++ b/roles/linux-gentoo/tasks/xorg.yml @@ -18,8 +18,8 @@ - name: Disable kernel modules vars: - modules: "{{ x.modules.blacklist }}" + modules: "{{ x.modules }}" template: - src: modprobe.d/xorg-blacklist.conf.j2 + src: modprobe.d/modules.conf.j2 dest: /etc/modprobe.d/xorg-blacklist.conf diff --git a/roles/linux-gentoo/templates/modprobe.d/xorg-blacklist.conf.j2 b/roles/linux-gentoo/templates/modprobe.d/modules.conf.j2 similarity index 74% rename from roles/linux-gentoo/templates/modprobe.d/xorg-blacklist.conf.j2 rename to roles/linux-gentoo/templates/modprobe.d/modules.conf.j2 index f0c834c..a7e8148 100644 --- a/roles/linux-gentoo/templates/modprobe.d/xorg-blacklist.conf.j2 +++ b/roles/linux-gentoo/templates/modprobe.d/modules.conf.j2 @@ -1,6 +1,6 @@ # {{ ansible_managed }} {% for module in modules %} -blacklist {{ module }} +{{ module }} {% endfor %} diff --git a/roles/linux-gentoo/vars/applications.yml b/roles/linux-gentoo/vars/applications.yml index 76cce04..1ac649c 100644 --- a/roles/linux-gentoo/vars/applications.yml +++ b/roles/linux-gentoo/vars/applications.yml @@ -35,6 +35,7 @@ apps: - app-admin/ansible-lint - app-benchmarks/hyperfine - sys-power/acpi_call + - ">=virtual/libcrypt-2" #- dev-python/resolvelib # OpenMW @@ -43,15 +44,15 @@ apps: #- "dev-games/recastnavigation ~amd64" # Containers - - app-emulation/buildah - - app-emulation/podman - - app-emulation/skopeo + - app-containers/buildah + - app-containers/podman + - app-containers/skopeo - net-misc/cni-plugins #- sys-fs/lvm2 - net-libs/libslirp #- sys-block/thin-provisioning-tools - - app-emulation/slirp4netns - - app-emulation/conmon + - app-containers/slirp4netns + - app-containers/conmon #- dev-libs/libaio - sys-fs/fuse-overlayfs - "sys-devel/prelink **" @@ -73,9 +74,9 @@ apps: - 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-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-emulation/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/buildah # https://github.com/containers/buildah A tool that facilitates building OCI images. + - app-containers/skopeo # https://github.com/containers/skopeo Command line utility foroperations on container images and image repositories. + - 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-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. @@ -117,13 +118,15 @@ apps: - 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-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-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-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/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. - 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. diff --git a/roles/linux-gentoo/vars/kernel_modules.yml b/roles/linux-gentoo/vars/kernel_modules.yml new file mode 100644 index 0000000..d393e3c --- /dev/null +++ b/roles/linux-gentoo/vars/kernel_modules.yml @@ -0,0 +1,5 @@ +--- + +kernel_modules: +- fuse + diff --git a/roles/linux-gentoo/vars/mount.yml b/roles/linux-gentoo/vars/mount.yml index be16073..61d3d60 100644 --- a/roles/linux-gentoo/vars/mount.yml +++ b/roles/linux-gentoo/vars/mount.yml @@ -1,12 +1,24 @@ mount: - tmpfs: - - path: /tmp - - path: /var/lock - - path: /var/tmp - options: rw,nosuid,noatime,nodev,size=5G,mode=1777 - - path: /var/calculate/tmp/portage - options: rw,nosuid,noatime,nodev,size=8G,mode=775,uid=portage,gid=portage - # - path: /var/tmp/portage - # options: rw,nosuid,noatime,nodev,size=5G,mode=775,uid=portage,gid=portage,x-mount.mkdir=775 + - path: /tmp + src: tmpfs + fstype: tmpfs + - path: /var/lock + src: tmpfs + fstype: tmpfs + - path: /var/tmp + src: tmpfs + fstype: tmpfs + options: rw,nosuid,noatime,nodev,size=5G,mode=1777 + - path: /var/calculate/tmp/portage + src: tmpfs + fstype: tmpfs + 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 + # fstype: tmpfs + # options: rw,nosuid,noatime,nodev,size=5G,mode=775,uid=portage,gid=portage,x-mount.mkdir=775 diff --git a/roles/linux-gentoo/vars/portage.yml b/roles/linux-gentoo/vars/portage.yml index c428aea..9886441 100644 --- a/roles/linux-gentoo/vars/portage.yml +++ b/roles/linux-gentoo/vars/portage.yml @@ -132,7 +132,7 @@ gentoo: - app-arch/lbzip2 symlink - app-arch/pigz symlink - 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/vifm X extended-keys magic - app-portage/eix sqlite @@ -169,8 +169,8 @@ gentoo: - media-gfx/graphviz -gtk tcl # Tcl/Tk Img package - media-gfx/imagemagick X - media-gfx/sxiv exif gif - - media-libs/freetype X cleartype_hinting adobe-cff harfbuzz - - media-libs/harfbuzz glib + - media-libs/freetype X cleartype_hinting adobe-cff -harfbuzz + - media-libs/harfbuzz X glib - media-libs/imlib2 X gif - media-libs/leptonica tiff - media-libs/libass fontconfig @@ -204,7 +204,7 @@ gentoo: - sys-apps/net-tools hostname - sys-apps/openrc netifrc - 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/texinfo standalone - sys-apps/util-linux logger @@ -212,7 +212,8 @@ gentoo: - sys-devel/binutils gold - sys-devel/gcc graphite pch ssp pgo -multilib - 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/linux-firmware redistributable - sys-libs/glibc multiarch nscd ssp -multilib @@ -222,7 +223,7 @@ gentoo: - x11-base/xorg-server -minimal xorg suid - x11-drivers/xf86-video-intel dri sna uddev uxa xvmc # Default USE flags. - 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/libxcb X xkb - x11-libs/pango X @@ -231,6 +232,7 @@ gentoo: - x11-misc/xmobar -alsa -dbus #mpd - x11-terms/st savedconfig - x11-wm/xmonad -default-term + - ">=virtual/libcrypt-2 -static-libs" enabled: # - lto # Build with link time optimization (LTO). diff --git a/roles/linux-gentoo/vars/services.yml b/roles/linux-gentoo/vars/services.yml index 0ee74f4..cac949c 100644 --- a/roles/linux-gentoo/vars/services.yml +++ b/roles/linux-gentoo/vars/services.yml @@ -5,7 +5,6 @@ services: - name: cupsd - name: bluetooth - name: sshd - - name: netmount - name: swap runlevel: boot enabled: diff --git a/roles/linux-gentoo/vars/system.yml b/roles/linux-gentoo/vars/system.yml index 3ba4dfa..c9c8939 100644 --- a/roles/linux-gentoo/vars/system.yml +++ b/roles/linux-gentoo/vars/system.yml @@ -1,6 +1,6 @@ system: - hostname: calculate + hostname: carbon tty_consoles: 4 console_font: cyr-sun16 display_brightness: 30 diff --git a/roles/linux-gentoo/vars/xorg.yml b/roles/linux-gentoo/vars/xorg.yml index 5d41569..74da37d 100644 --- a/roles/linux-gentoo/vars/xorg.yml +++ b/roles/linux-gentoo/vars/xorg.yml @@ -1,8 +1,7 @@ x: driver: nvidia modules: - blacklist: - - nouveau + - blacklist nouveau font_name: NotoMono Nerd Font xkb: directory: /usr/share/X11/xkb/symbols