From 2c984ec534e864fa3c12b51941f06ea7c7c36aec Mon Sep 17 00:00:00 2001 From: "flyingscorpio@clevo" Date: Thu, 10 Mar 2022 22:18:08 +0100 Subject: [PATCH] Add role gaming --- configs.yml | 59 ------------------------------- playbook.yml | 1 + roles/gaming/meta/main.yml | 3 ++ roles/gaming/tasks/main.yml | 69 +++++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 59 deletions(-) create mode 100644 roles/gaming/meta/main.yml create mode 100644 roles/gaming/tasks/main.yml diff --git a/configs.yml b/configs.yml index f7ee496..32652e3 100644 --- a/configs.yml +++ b/configs.yml @@ -10,62 +10,3 @@ etckeeper: condition: "[ ! -d /etc/.git ]" - run: - sudo etckeeper commit "First commit" - -gaming: - - run: - command: sudo cp /etc/pacman.conf /etc/pacman.conf.backup - condition: "[ ! -e /etc/pacman.conf.backup ]" - - run: - - 'LINESTART=$(grep -n "\[multilib\]" /etc/pacman.conf | cut -d: -f1 | head -n1); LINEEND=$((LINESTART+1)); sudo sed -i "${LINESTART},${LINEEND} s/^#//" /etc/pacman.conf' - - install: - - wine-staging - - winetricks - - lutris - - steam - - gamemode - - giflib - - lib32-giflib - - libpng - - lib32-libpng - - libldap - - lib32-libldap - - gnutls - - lib32-gnutls - - mpg123 - - lib32-mpg123 - - openal - - lib32-openal - - v4l-utils - - lib32-v4l-utils - - libpulse - - lib32-libpulse - - libgpg-error - - lib32-libgpg-error - - alsa-plugins - - lib32-alsa-plugins - - alsa-lib - - lib32-alsa-lib - - libjpeg-turbo - - lib32-libjpeg-turbo - - sqlite - - lib32-sqlite - - libxcomposite - - lib32-libxcomposite - - libxinerama - - lib32-libxinerama - - libgcrypt - - lib32-libgcrypt - - ncurses - - lib32-ncurses - - opencl-icd-loader - - lib32-opencl-icd-loader - - libxslt - - lib32-libxslt - - libva - - lib32-libva - - gtk3 - - lib32-gtk3 - - gst-plugins-base-libs - - lib32-gst-plugins-base-libs - - vulkan-icd-loader - - lib32-vulkan-icd-loader diff --git a/playbook.yml b/playbook.yml index d84858a..0025fb0 100644 --- a/playbook.yml +++ b/playbook.yml @@ -30,3 +30,4 @@ - { role: mariadb, tags: mariadb } - { role: rsync-backup, tags: rsync-backup } - { role: gitea-backup, tags: gitea-backup } + - { role: gaming, tags: gaming } diff --git a/roles/gaming/meta/main.yml b/roles/gaming/meta/main.yml new file mode 100644 index 0000000..edef5f0 --- /dev/null +++ b/roles/gaming/meta/main.yml @@ -0,0 +1,3 @@ +--- +dependencies: + - role: check-sudo diff --git a/roles/gaming/tasks/main.yml b/roles/gaming/tasks/main.yml new file mode 100644 index 0000000..5e1b3cb --- /dev/null +++ b/roles/gaming/tasks/main.yml @@ -0,0 +1,69 @@ +--- +- fail: + when: ansible_distribution != 'Archlinux' + +- name: Activate multilib repository + become: true + replace: + path: /etc/pacman.conf + regexp: '^#\[multilib\]\n#(Include.*)' + replace: '[multilib]\n\1' + backup: true + +- name: Install packages + become: true + pacman: + name: + - wine-staging + - winetricks + - lutris + - steam + - gamemode + - giflib + - lib32-giflib + - libpng + - lib32-libpng + - libldap + - lib32-libldap + - gnutls + - lib32-gnutls + - mpg123 + - lib32-mpg123 + - openal + - lib32-openal + - v4l-utils + - lib32-v4l-utils + - libpulse + - lib32-libpulse + - libgpg-error + - lib32-libgpg-error + - alsa-plugins + - lib32-alsa-plugins + - alsa-lib + - lib32-alsa-lib + - libjpeg-turbo + - lib32-libjpeg-turbo + - sqlite + - lib32-sqlite + - libxcomposite + - lib32-libxcomposite + - libxinerama + - lib32-libxinerama + - libgcrypt + - lib32-libgcrypt + - ncurses + - lib32-ncurses + - opencl-icd-loader + - lib32-opencl-icd-loader + - libxslt + - lib32-libxslt + - libva + - lib32-libva + - gtk3 + - lib32-gtk3 + - gst-plugins-base-libs + - lib32-gst-plugins-base-libs + - vulkan-icd-loader + - lib32-vulkan-icd-loader + update_cache: true + when: ansible_distribution == 'Archlinux'