From 6e68a163a207529883dc61330dade959b4a83945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Tue, 11 Jan 2022 17:03:28 +0100 Subject: roles/workstation: Split distribution variable files --- roles/workstation/defaults/main.yml | 146 +++++++++----------------------- roles/workstation/tasks/main.yml | 3 + roles/workstation/tasks/pkgs.yml | 4 +- roles/workstation/vars/os_archlinux.yml | 51 +++++++++++ roles/workstation/vars/os_openbsd.yml | 11 +++ 5 files changed, 108 insertions(+), 107 deletions(-) create mode 100644 roles/workstation/vars/os_archlinux.yml create mode 100644 roles/workstation/vars/os_openbsd.yml diff --git a/roles/workstation/defaults/main.yml b/roles/workstation/defaults/main.yml index cc7ae5f..ebf7a91 100644 --- a/roles/workstation/defaults/main.yml +++ b/roles/workstation/defaults/main.yml @@ -3,108 +3,44 @@ workstation_user: qwd workstation_yay_repo: https://aur.archlinux.org/yay-bin.git workstation_yay_dir: /tmp/yay -workstation_pkgs: - common: - - ansible - - ansible-lint - - calcurse - - cmus - - dmenu - - feh - - fzf - - git - - git-crypt - - glances - - gnupg - - go - - gopass - - htop - - inotify-tools - - ipmitool - - jq - - mpv - - neomutt - - neovim - - newsboat - - nmap - - qutebrowser - - rsync - - rtorrent - - rust - - syncthing - - terminus-font - - tig - - tor - - unzip - - vlc - - weechat - - wget - - wkhtmltopdf - - xclip - - zathura - - zip - - zsh - - archlinux: - - acpi - - base-devel - - bind - - clang - - docker - - docker-compose - - easyeffects - - firefox - - light - - libvirt - - man-db - - nfs-utils - - npm - - obs-studio - - openbsd-netcat - - opendoas - - pamixer - - pavucontrol - - pcsc-tools - - pdfjs - - pipewire - - pipewire-alsa - - pipewire-pulse - - postgresql - - pyenv - - python-netaddr - - python-nodeenv - - python-pip - - python-pipx - - python-poetry - - python-pynvim - - python-qrencode - - qemu - - signify - - strace - - tar - - tmux - - torbrowser-launcher - - traceroute - - vi - - wireguard-tools - - xf86-input-synaptics - - xorg-apps - - xorg-server - - xorg-xinit - - xorg-xwayland - - xsecurelock - - yarn - - yt-dlp - - zathura-pdf-mupdf - - openbsd: - - docker-cli - - gomuks - - mozilla-firefox - - pcsc-lite - - pcsc-tools - - py3-neovim - - py3-netaddr - - py3-pip - - tor-browser - - wireguard-tools +workstation_pkgs: [] +workstation_pkgs_common: + - ansible + - ansible-lint + - calcurse + - cmus + - dmenu + - feh + - fzf + - git + - git-crypt + - glances + - gnupg + - go + - gopass + - htop + - inotify-tools + - ipmitool + - jq + - mpv + - neomutt + - neovim + - newsboat + - nmap + - qutebrowser + - rsync + - rtorrent + - rust + - syncthing + - terminus-font + - tig + - tor + - unzip + - vlc + - weechat + - wget + - wkhtmltopdf + - xclip + - zathura + - zip + - zsh diff --git a/roles/workstation/tasks/main.yml b/roles/workstation/tasks/main.yml index 87f6188..0e4a9c2 100644 --- a/roles/workstation/tasks/main.yml +++ b/roles/workstation/tasks/main.yml @@ -1,3 +1,6 @@ +- name: include specific distribution variables + include_vars: "os_{{ ansible_distribution | lower }}.yml" + - name: include packages tags: always include_tasks: diff --git a/roles/workstation/tasks/pkgs.yml b/roles/workstation/tasks/pkgs.yml index fd8a65a..f4f2f44 100644 --- a/roles/workstation/tasks/pkgs.yml +++ b/roles/workstation/tasks/pkgs.yml @@ -3,5 +3,5 @@ name: "{{ item }}" state: present loop: - - "{{ workstation_pkgs['common'] }}" - - "{{ workstation_pkgs[ansible_distribution | lower] }}" + - "{{ workstation_pkgs_common }}" + - "{{ workstation_pkgs }}" diff --git a/roles/workstation/vars/os_archlinux.yml b/roles/workstation/vars/os_archlinux.yml new file mode 100644 index 0000000..5484541 --- /dev/null +++ b/roles/workstation/vars/os_archlinux.yml @@ -0,0 +1,51 @@ +workstation_pkgs: + - acpi + - base-devel + - bind + - clang + - docker + - docker-compose + - easyeffects + - firefox + - light + - libvirt + - man-db + - nfs-utils + - npm + - obs-studio + - openbsd-netcat + - opendoas + - pamixer + - pavucontrol + - pcsc-tools + - pdfjs + - pipewire + - pipewire-alsa + - pipewire-pulse + - postgresql + - pyenv + - python-netaddr + - python-nodeenv + - python-pip + - python-pipx + - python-poetry + - python-pynvim + - python-qrencode + - qemu + - signify + - strace + - tar + - tmux + - torbrowser-launcher + - traceroute + - vi + - wireguard-tools + - xf86-input-synaptics + - xorg-apps + - xorg-server + - xorg-xinit + - xorg-xwayland + - xsecurelock + - yarn + - yt-dlp + - zathura-pdf-mupdf diff --git a/roles/workstation/vars/os_openbsd.yml b/roles/workstation/vars/os_openbsd.yml new file mode 100644 index 0000000..4c3dc8b --- /dev/null +++ b/roles/workstation/vars/os_openbsd.yml @@ -0,0 +1,11 @@ +workstation_pkgs: + - docker-cli + - gomuks + - mozilla-firefox + - pcsc-lite + - pcsc-tools + - py3-neovim + - py3-netaddr + - py3-pip + - tor-browser + - wireguard-tools -- cgit v1.2.3